The router offers built-in support for OTEL and Prometheus. OTEL data is exported through exporters. For reference please take a look at the OpenTelemetry section.
router.http.requests
: Total count of incoming requests.
router.http.response.content_length
: Total bytes of incoming requests
router.http.request.content_length
: Total bytes of outgoing responses
router.http.request.duration_milliseconds
: End-to-end duration of incoming requests in (histogram)
router.http.requests.in_flight
: Number of in-flight requests. (Only static and subgraph dimensions are attached)
router.http.requests.error
: Total number of failed requests.
router_info
: Provides information about the router configuration versions currently in use. There will be one entry for the base configuration and additional entries for each feature flag. For the base configuration, no feature flag name will be attached. The metric value is always set to 1. The metric includes the following attributes:
wg_router_config_version
: The identifier of the router execution configurationwg_router_version
: The version of the router that is runningwg_feature_flag
: (Optional) The name of the feature flag if this is a feature flag configurationrouter.graphql.operation.planning_time
: Time taken to plan the operation. An additional attribute wg.engine.plan_cache_hit
indicates if the plan was served from the cache.
runtime.uptime
: Seconds since application was initialized
server.uptime
: Seconds since the server was initialized. Typically, this time represents how long a specific version of the graph has been running when polling from the controlplane is enabled.
process.cpu.usage
: Total CPU usage of this process in percentage of host total CPU capacity
process.runtime.go.mem.heap_alloc
: Bytes of allocated heap objects
process.runtime.go.mem.heap_idle
: Bytes in idle (unused) spans
process.runtime.go.mem.heap_inuse
: Bytes in in-use spans
process.runtime.go.mem.heap_objects
: Number of allocated heap objects
process.runtime.go.mem.heap_released
: Bytes of idle spans whose physical memory has been returned to the OS
process.runtime.go.mem.heap_sys
: Bytes of heap memory obtained from the OS
process.runtime.go.mem.live_objects
: Number of live objects is the number of cumulative Mallocs - Frees
process.runtime.go.gc.count
: Number of completed garbage collection cycles
process.runtime.go.goroutines.count
: Number of goroutines that currently exist
process.runtime.go.info
: Information about the Go runtime environment e.g. Go version
wg.federated_graph.id
: The ID of the running graph
wg.router.version
: The current router binary version
wg.router.config.version
: The current router config version
wg.operation.protocol
: The used protocol http
, ws
wg.operation.name
: The name of the operation
wg.operation.type
: The type of the operation e.g. query
wg.client.name
: The client name
wg.client.version
: The client version
router.http.requests.error
metric to track errors across router and subgraph requests. In addition to that, you can also use the router.http.requests
metric to identify errors. We attach the following fields:
wg.request.error
: Identify if an error occurred. This applies to a request that didn’t result in a successful HTTP or GraphQL response. Only set when it is true
. Be aware that a Status-Code 200
can still be an error in GraphQL.
http.status_code
: The status code of the response.
router.http.requests.error
metric.
wg.subgraph.name
: The name of the subgraph
wg.subgraph.id
: The ID of the subgraph
target_info
metric.
service.name
: The name of the router. Can be configured through the telemetry.service_name
option.
service.version
: The version of the router binary.
service.instance.id
: The unique instance ID of the router. Can be configured through the instance_id
option.
process.pid
: The id of the running process
host.name
: The hostname of the machine where the router is running.
telemetry.sdk.version
: The version of instrumentation library.
telemetry.sdk.language
: The programming language of the instrumented application.
subgraph
: The name of the subgraph, this is because we keep a connection pool per subgraph. And users can customize the number of max connections per subgraph. And also as it is possible also for a host to be shared across subgraphs.
host
: The host, which is what Go internally uses to track connection pools (Go sets the max connections per host). This dimension is not available for router.http.client.connection.max
as it reflects configuration values only without the context of a host
.
router.http.client.connection.max
: Static configuration values with the maximum connections allowed per host with a subgraph dimension.
router.http.client.connection.active
: The number of currently active connections, grouped by both subgraph and host. A connection is considered active once it has completed DNS resolution, TLS handshake, and dialing. While it’s less common, multiple subgraphs can share the same host, which is why both dimensions are included.
router.http.client.connection.acquire_duration
: The duration in ms that a connection took to be initialized, which includes all of DNS, TLS Handshakes, and Dialing the host.
Engine - Fetch
Span. These events include details such as the subgraph name, ID, error message, and extension code (if available). Additionally, we increment the router.http.requests.error
metric.
router_http_request_duration_milliseconds
histogram and the label wg_client_version
from all metrics.
router_*
metrics because no metrics have been generated.0.0.0.0
to make the port accessible from outside.You can enable it by setting the following configuration.