-
Notifications
You must be signed in to change notification settings - Fork 272
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
feat(telemetry): selectively transmit/redact subgraph ftv1 error messages to studio #3011
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
482b78b
feat(telemetry): add a way to redact errors for studio
bnjjj f2bbf1e
feat(telemetry): add a way to redact errors for studio
bnjjj 9c83a19
feat(telemetry): add a way to redact errors for studio
bnjjj b96cf07
feat(telemetry): add a way to redact errors for studio
bnjjj 4ab2ba5
docs
bnjjj 7fda23e
Apply suggestions from code review
abernix a0a7206
Apply suggestions from code review
abernix 8ee33fb
Update tests to use `<redacted>` rather than `<masked>`.
abernix c258655
Update snaps
abernix 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 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,36 @@ | ||
### Add ability to transmit un-redacted errors from federated traces to Apollo Studio | ||
|
||
When using subgraphs which are enabled with [Apollo Federated Tracing](https://www.apollographql.com/docs/router/configuration/apollo-telemetry/#enabling-field-level-instrumentation), the error messages within those traces will be **redacted by default**. | ||
|
||
New configuration (`tracing.apollo.errors.subgraph.all.redact`, which defaults to `true`) enables or disables the redaction mechanism. Similar configuration (`tracing.apollo.errors.subgraph.all.send`, which also defaults to `true`) enables or disables the entire transmission of the error to Studio. | ||
|
||
The error messages returned to the clients are **not** changed or redacted from their previous behavior. | ||
|
||
To enable sending subgraph's federated trace error messages to Studio **without redaction**, you can set the following configuration: | ||
|
||
```yaml title="router.yaml" | ||
telemetry: | ||
apollo: | ||
errors: | ||
subgraph: | ||
all: | ||
send: true # (true = Send to Studio, false = Do not send; default: true) | ||
redact: false # (true = Redact full error message, false = Do not redact; default: true) | ||
``` | ||
|
||
It is also possible to configure this **per-subgraph** using a `subgraphs` map at the same level as `all` in the configuration, much like other sections of the configuration which have subgraph-specific capabilities: | ||
|
||
```yaml title="router.yaml" | ||
telemetry: | ||
apollo: | ||
errors: | ||
subgraph: | ||
all: | ||
send: true | ||
redact: false # Disable redaction as a default. The `accounts` service enables it below. | ||
subgraphs: | ||
accounts: # Applies to the `accounts` subgraph, overriding the `all` global setting. | ||
redact: true # Redact messages from the `accounts` service. | ||
``` | ||
|
||
By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/3011 |
This file contains 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
10 changes: 10 additions & 0 deletions
10
...er__configuration__tests__upgrade_old_configuration@field_level_instrumentation.yaml.snap
This file contains 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,10 @@ | ||
--- | ||
source: apollo-router/src/configuration/tests.rs | ||
expression: new_config | ||
--- | ||
--- | ||
telemetry: | ||
apollo: | ||
field_level_instrumentation: | ||
sampler: always_off | ||
|
This file contains 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 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.
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.
What was the motivation for this change in relation to this PR?