-
Notifications
You must be signed in to change notification settings - Fork 6
Tracing with OpenTelemetry #598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kamilkisiela
wants to merge
7
commits into
main
Choose a base branch
from
kamil-tracing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+9,315
−678
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5a7a162
Tracing with OpenTelemetry
kamilkisiela 2fb3028
test cache.hit attributes
kamilkisiela 811de91
Switch tonic to tls-aws-lc and remove native roots
kamilkisiela 5de5db4
Prefer rustls for opentelemetry
kamilkisiela 5cfd361
usage -> usage_reporting
kamilkisiela a5a3010
match capacity
kamilkisiela b9bd56e
Add moka cache for trace ID filtering
kamilkisiela File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
| internal: minor | ||
| router: minor | ||
| config: minor | ||
| executor: minor | ||
| query-planner: minor | ||
| --- | ||
|
|
||
| # Tracing with OpenTelemetry | ||
|
|
||
| Introducing comprehensive OpenTelemetry-based tracing to the Hive Router, providing deep visibility into the GraphQL request lifecycle and subgraph communications. | ||
|
|
||
| - **OpenTelemetry Integration**: Support for OTLP exporters (gRPC and HTTP) and standard propagation formats (Trace Context, Baggage, Jaeger, B3/Zipkin). | ||
| - **GraphQL-Specific Spans**: Detailed spans for every phase of the GraphQL lifecycle | ||
| - **Hive Console Tracing**: Native integration with Hive Console for trace visualization and analysis. | ||
| - **Semantic Conventions**: Support for both stable and deprecated OpenTelemetry HTTP semantic conventions to ensure compatibility with a wide range of observability tools. | ||
| - **Optimized Performance**: Tracing is designed with a "pay only for what you use" approach. Overhead is near-zero when disabled, and allocations/computations are minimized when enabled. | ||
| - **Rich Configuration**: New configuration options for telemetry exporters, batching, and resource attributes. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| --- | ||
| config: minor | ||
| router: minor | ||
| internal: minor | ||
kamilkisiela marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| --- | ||
|
|
||
| # Unified Hive Telemetry Configuration | ||
|
|
||
| Refactored the configuration structure to unify Hive-specific telemetry (tracing and usage reporting) and centralize client identification. | ||
|
|
||
| - **Unified Hive Config**: Moved `usage_reporting` under `telemetry.hive.usage_reporting`. Usage reporting now shares the `token` and `target` configuration with Hive tracing, eliminating redundant settings. | ||
| - **Centralized Client Identification**: Introduced `telemetry.client_identification` to define client name and version headers once. These are now propagated to both OpenTelemetry spans and Hive usage reports. | ||
| - **Enhanced Expression Support**: Both Hive token and target ID now support VRL expressions for usage reporting, matching the existing behavior of tracing. | ||
|
|
||
| ### Breaking Changes: | ||
|
|
||
| The top-level `usage_reporting` block has been moved. | ||
|
|
||
| **Before:** | ||
| ```yaml | ||
| usage_reporting: | ||
| enabled: true | ||
| access_token: "..." | ||
| target_id: "..." | ||
| client_name_header: "..." | ||
| client_version_header: "..." | ||
| ``` | ||
|
|
||
| **After:** | ||
| ```yaml | ||
| telemetry: | ||
| client_identification: | ||
| name_header: "..." | ||
| version_header: "..." | ||
| hive: | ||
| token: "..." | ||
| target: "..." | ||
| usage_reporting: | ||
| enabled: true | ||
| ``` | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the repository style guide (lines 116-120), when a change is done in one of the Crates, it needs to be explicitly declared in the
changesetfile, so it includes the impacted libs/bins as well. Thegraphql-toolscrate is a dependency ofhive-router-query-planner,hive-console-sdk, andhive-router-plan-executor. Therefore, a change ingraphql-toolsshould also be reflected in their respective changeset entries if they are impacted. Please verify ifgraphql-toolsshould be listed here.References