v1.54.0
🚀 Features
Add configurability of span attributes in logs (Issue #5540)
The router supports a new telemetry.exporters.logging.stdout.format.json.span_attributes
option that enables you to choose a subset of all span attributes to display in your logs.
When span_attributes
is specified, the router searches for the first attribute in its input list of span attributes from the root span to the current span and attaches it to the outermost JSON object for the log event. If you set the same attribute name for different spans at different levels, the router chooses the attributes of child spans before the attributes of parent spans.
For example, if you have spans that contains span_attr_1
attribute and you only want to display this span attribute:
telemetry:
exporters:
logging:
stdout:
enabled: true
format:
json:
display_span_list: false
span_attributes:
- span_attr_1
Example output with a list of spans:
{
"timestamp": "2023-10-30T14:09:34.771388Z",
"level": "INFO",
"fields": {
"event_attr_1": "event_attr_1",
"event_attr_2": "event_attr_2"
},
"target": "event_target",
"span_attr_1": "span_attr_1"
}
To learn more, go to span_attributes
docs.
By @bnjjj in #5867
Add a histogram metric tracking evaluated query plans (PR #5875)
The router supports the new apollo.router.query_planning.plan.evaluated_plans
histogram metric to track the number of evaluated query plans.
You can use it to help set an optimal supergraph.query_planning.experimental_plans_limit
option that limits the number of query plans evaluated for a query and reduces the time spent planning.
🐛 Fixes
Fix Datadog sampling (PR #5788)
The router's Datadog exporter has been fixed so that traces are sampled as intended.
Previously, the Datadog exporter's context may not have been set correctly, causing traces to be undersampled.
By @BrynCooke & @bnjjj in #5788
📃 Configuration
General availability of Apollo usage report generation (#5807)
The router's Apollo usage report generation feature that was previously experimental is now generally available.
If you used its experimental configuration, you should migrate to the new configuration options:
telemetry.apollo.experimental_apollo_metrics_reference_mode
is nowtelemetry.apollo.metrics_reference_mode
telemetry.apollo.experimental_apollo_signature_normalization_algorithm
is nowtelemetry.apollo.signature_normalization_algorithm
experimental_apollo_metrics_generation_mode
has been removed because the Rust implementation (the default since router v1.49.0) is generating reports identical to the previous router-bridge implementation
The experimental configuration options are now deprecated. They are functional but will log warnings.
Helm: Enable easier Kubernetes debugging with heaptrack (Issue #5789)
The router's Helm chart has been updated to help make debugging with heaptrack easier.
Previously, when debugging multiple Pods with heaptrack, all Pods wrote to the same file, so they'd overwrite each others' results. This issue has been fixed by adding a hostname
to each output data file from heaptrack.
Also, the Helm chart now supports a restartPolicy
that enables you to configure a Pod's restart policy. The default value of restartPolicy
is Always
(the same as the Kubernetes default).
📚 Documentation
Document OpenTelemetry information for operation limits (PR #5884)
The router's docs for operation limits now describe using telemetry to set operation limits and logging values.
By @andrewmcgivery in #5884