Skip to Content

telemetry

The telemetry configuration controls client identification, Hive reporting, and OpenTelemetry tracing and metrics 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

metrics

Top-level OpenTelemetry metrics configuration.

Show metrics configuration

Metrics are enabled when at least one exporter is configured and enabled.

FieldTypeDefaultNotes
exportersarray[]List of exporters used to send metrics.
instrumentationobject{}Instrument behavior for metrics (histogram aggregation and per-instrument overrides).
exporters

Each item configures one metrics exporter.

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

This reference documents OTLP and Prometheus exporter configuration.

FieldTypeDefaultNotes
kindstring-Exporter kind. Supported values: otlp, prometheus.
enabledbooleantrueEnables or disables this exporter.
otlp
FieldTypeDefaultNotes
kindstring-Must be otlp.
enabledbooleantrueEnables or disables this exporter.
endpointStringOrExpression-OTLP endpoint. Must be set explicitly.
protocolstring-OTLP transport protocol. Supported values: http, grpc.
intervalstring60sInterval between OTLP export attempts.
temporalitystringcumulativeAggregation temporality. Supported values: cumulative, delta.
max_export_timeoutstring5sMaximum time for one OTLP export attempt.
httpobject-HTTP-specific OTLP settings (for protocol: http).
grpcobject-gRPC-specific OTLP settings (for protocol: grpc).

OTLP over HTTP:

FieldTypeValue / DefaultNotes
protocolstringhttpOTLP transport protocol.
http.headersobject{}Map of header names to values (string or { expression }).
router.config.yaml
telemetry: metrics: exporters: - kind: otlp enabled: true protocol: http endpoint: https://otel-collector.example.com/v1/metrics interval: 60s temporality: cumulative max_export_timeout: 5s 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: metrics: exporters: - kind: otlp enabled: true protocol: grpc endpoint: https://otel-collector.example.com:4317 interval: 60s temporality: cumulative max_export_timeout: 5s grpc: metadata: x-api-key: key
prometheus
FieldTypeDefaultNotes
kindstring-Must be prometheus.
enabledbooleantrueEnables/disables Prometheus metrics export.
portinteger-Optional port for metrics endpoint.
pathstring/metricsHTTP path exposed for scraping.
router.config.yaml
telemetry: metrics: exporters: - kind: prometheus enabled: true port: 9090 path: /metrics
instrumentation

Controls histogram aggregation and per-instrument overrides.

FieldTypeDefaultNotes
common.histogramobjectexponential aggregationHistogram aggregation strategy for instrumented histograms.
instrumentsobject{}Map of metric name to false, true, or object override.
common.histogram

Set aggregation mode with aggregation.

explicit aggregation:

FieldTypeDefaultNotes
aggregationstring-Must be explicit.
boundariesnumber[]-Explicit bucket boundaries.
record_min_maxbooleanfalseRecord min/max values.

exponential aggregation (default):

FieldTypeDefaultNotes
aggregationstring-Must be exponential.
max_sizeinteger160Max bucket count.
max_scaleinteger20Max scale for bucket precision.
record_min_maxbooleanfalseRecord min/max values.
instruments

instruments is a map keyed by metric name. Value can be:

  • false to disable a metric
  • true to keep defaults
  • object to keep metric enabled and override attributes

Object form supports:

FieldTypeNotes
attributesobjectMap of attribute name to boolean (false drops attribute, true keeps it).
router.config.yaml
telemetry: metrics: instrumentation: common: histogram: aggregation: exponential max_size: 160 max_scale: 20 instruments: http.server.request.duration: true http.client.request.duration: attributes: subgraph.name: true http.response.status_code: true server.address: false
Last updated on