-
Notifications
You must be signed in to change notification settings - Fork 328
Adding context_id support to selectors #8899
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
be3cdc7
Adding context_id support to selectors
BobaFetters 884805c
Updating snapshot
BobaFetters 242fbd1
Merge branch 'dev' into fix/graphos-67
BobaFetters 34b4e3d
Adding Changeset
BobaFetters 9d6d691
Adding context id to connectors
BobaFetters c48e2fc
Merge branch 'dev' into fix/graphos-67
BobaFetters 38b7980
Addressing feedback
BobaFetters a33b3f0
Merge branch 'dev' into fix/graphos-67
BobaFetters 98fe9b6
Changeset update
BobaFetters 292df97
Merge branch 'dev' into fix/graphos-67
BobaFetters ea5ac9f
Address minor style change for readability
BobaFetters 3075be1
Merge branch 'dev' into fix/graphos-67
BobaFetters 3662380
Fixing linting issues
BobaFetters 24e66a8
Merge branch 'dev' into fix/graphos-67
BobaFetters e0850aa
More linting updates
BobaFetters 6b19f20
Merge branch 'dev' into fix/graphos-67
BobaFetters 6c3a3b7
Merge branch 'dev' into fix/graphos-67
BobaFetters 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,31 @@ | ||
| ### Add `context_id` selector for telemetry to expose unique per-request identifier ([#8899](https://github.com/apollographql/router/pull/8899)) | ||
|
|
||
| A new `context_id` selector is now available for router, supergraph, subgraph, and connector telemetry instrumentation. This selector exposes the unique per-request context ID that can be used to reliably correlate and debug requests in traces, logs, and custom events. | ||
|
|
||
| Previously, while the context ID was accessible in Rhai scripts as `request.id`, there was no telemetry selector to expose it. With this change, users can now include `context_id: true` in their telemetry configuration to add the context ID to spans, logs, and custom events. | ||
|
|
||
| Example configuration: | ||
|
|
||
| ```yaml | ||
| telemetry: | ||
| instrumentation: | ||
| spans: | ||
| router: | ||
| attributes: | ||
| "request.id": | ||
| context_id: true | ||
| supergraph: | ||
| attributes: | ||
| "request.id": | ||
| context_id: true | ||
| subgraph: | ||
| attributes: | ||
| "request.id": | ||
| context_id: true | ||
| connector: | ||
| attributes: | ||
| "request.id": | ||
| context_id: true | ||
| ``` | ||
|
|
||
| By [@BobaFetters](https://github.com/BobaFetters) in https://github.com/apollographql/router/pull/8899 |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.