Skip to Content

telemetry

The telemetry configuration controls client identification, Hive reporting, and OpenTelemetry tracing behavior in Hive Router.

client_identification

Configure how Hive Router identifies calling clients in telemetry, based on request headers.

FieldTypeNotes
name_headerstringHTTP header used to read client name for usage reporting.
version_headerstringHTTP header used to read client version for usage reporting.
router.config.yaml
telemetry: client_identification: name_header: graphql-client-name # default version_header: graphql-client-version # default

resource

Attach OpenTelemetry resource attributes that describe this router instance, such as service name, version, or environment.

FieldTypeDefaultNotes
attributesobject{}Additional OpenTelemetry resource attributes
router.config.yaml
telemetry: resource: attributes: service.name: expression: env("SERVICE_NAME") service.version: 1.0.0

hive

Hive-specific telemetry options.

Show hive configuration
FieldTypeNotes
tokenStringOrExpressionYour Registry Access Token with write permission.
You can also set HIVE_ACCESS_TOKEN.
targetStringOrExpressionTarget ID as slug (the-guild/graphql-hive/staging) or UUID (a0f4c605-6541-4350-8cfe-b31f21a4bf80).
You can also set HIVE_TARGET.
usage_reporting

Allows you to control how the Hive Router does usage reporting to Hive Console.

For additional information about the usage reporting process in Hive Router, see the Usage Reporting page.

FieldTypeDefaultNotes
enabledbooleanfalseExplicitly enable or disable usage reporting.
endpointstringhttps://app.graphql-hive.com/usageOverride for self-hosted Hive.
sample_ratestring100%Percentage between 0% and 100%.
excludestring[][]Operation names to ignore (for example IntrospectionQuery).
buffer_sizeinteger1000Buffer size before flush.
accept_invalid_certsbooleanfalseAccept invalid SSL certificates for usage reporting.
connect_timeoutstring5sTimeout for connect phase only.
request_timeoutstring15sTimeout for the full request.
flush_intervalstring5sBuffer flush interval.
router.config.yaml
telemetry: hive: usage_reporting: enabled: true exclude: ['IntrospectionQuery']
tracing

This configuration object controls sending traces to Hive Console.

FieldTypeDefaultNotes
enabledbooleanfalseIf true, the Hive Router sends traces to Hive Console.
endpointStringOrExpressionhttps://api.graphql-hive.com/otel/v1/tracesHive Console traces ingestion endpoint.
batch_processorobject-See batch_processor below.

Batching settings for traces sent to Hive Console:

FieldTypeDefaultNotes
max_traces_in_memoryinteger30000Maximum number of traces in memory.
max_spans_per_traceinteger1000Maximum spans buffered per trace.
max_export_timeoutstring5sMaximum time to wait for batch export.
max_queue_sizeinteger20000Capacity of the internal queue before export.
max_export_batch_sizeinteger500Maximum traces per single export batch.
scheduled_delaystring5sMaximum delay before exporting ready traces.
max_concurrent_exportsinteger1Maximum number of concurrent export tasks.
router.config.yaml
telemetry: hive: tracing: enabled: true

tracing

Top-level OpenTelemetry tracing configuration.

Show tracing configuration

collect - Collection and sampling limits for spans.

FieldTypeDefaultNotes
max_events_per_spaninteger128Maximum events to record per span.
max_attributes_per_spaninteger128Maximum attributes to record per span.
max_attributes_per_eventinteger16Maximum attributes to record per span event.
max_attributes_per_linkinteger32Maximum attributes to record per span link.
samplingnumber1.0Sampling ratio between 0.0 and 1.0.
parent_based_samplerbooleanfalseInherit sampling decisions from parent span.

propagation - Incoming and outgoing trace context propagation formats.

These settings apply to both extracting trace context from incoming requests and injecting trace context into outgoing requests.

FieldTypeDefaultNotes
trace_contextbooleantrueEnable W3C Trace Context propagation.
baggagebooleanfalseEnable W3C Baggage propagation.
b3booleanfalseEnable B3 propagation.
jaegerbooleanfalseEnable Jaeger propagation.

instrumentation - Instrumentation behavior for spans.

FieldTypeDefaultAllowed valuesNotes
spans.modestringspec_compliantspec_compliant, deprecated, spec_and_deprecatedControls which semantic conventions are emitted on spans.
exporters

List of exporters used to send traces.

Each item in this array defines one exporter instance, so you can configure multiple OTLP destinations if needed.

This reference documents the OTLP exporter configuration.

FieldTypeDefaultNotes
kindstring-Exporter kind. Supported value: otlp.
enabledbooleantrueEnables or disables this exporter.
endpointStringOrExpression-OTLP endpoint. Must be set explicitly.
batch_processorobject-See batch_processor below.

batch_processor settings for this exporter:

FieldTypeDefault
max_concurrent_exportsinteger1
max_export_batch_sizeinteger512
max_queue_sizeinteger2048
max_export_timeoutstring5s
scheduled_delaystring5s

OTLP over HTTP:

FieldTypeValue / DefaultNotes
protocolstringhttpOTLP transport protocol.
http.headersobject{}Map of header names to values (string or { expression }).
router.config.yaml
telemetry: tracing: exporters: - kind: 'otlp' enabled: true protocol: http http: headers: x-otlp-header: value

OTLP over gRPC:

FieldTypeValue / DefaultNotes
protocolstringgrpcOTLP transport protocol.
grpc.metadataobject{}Map of metadata keys to values (string or { expression }).
grpc.tls.domain_namestring-Domain name used to verify the server certificate.
grpc.tls.keystring-Path to the client private key file.
grpc.tls.certstring-Path to the client certificate file (PEM).
grpc.tls.castring-Path to the CA certificate file (PEM) used to verify the server certificate.
router.config.yaml
telemetry: tracing: exporters: - kind: 'otlp' enabled: true protocol: grpc grpc: metadata: x-api-key: key
Last updated on