Skip to content
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): add error section in custom attributes configuration #1443

Merged
merged 4 commits into from
Aug 1, 2022

Conversation

bnjjj
Copy link
Contributor

@bnjjj bnjjj commented Jul 27, 2022

close #1434

Add the ability to add custom attributes on errors:

telemetry:
  metrics:
    prometheus:
      enabled: true
    common:
      attributes:
        subgraph:
          all:
            errors: # Only works if it's a valid GraphQL error
              include_messages: true # Will include the error message in a message attribute
              extensions: # Include extension data
                - name: subgraph_error_extended_type # Name of the attribute
                  path: .type # JSON query path to fetch data from extensions

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
@bnjjj bnjjj requested a review from StephenBarlow as a code owner July 27, 2022 14:58
@github-actions

This comment has been minimized.

@bnjjj bnjjj self-assigned this Jul 27, 2022
bnjjj added 2 commits July 27, 2022 17:05
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Copy link
Contributor

@BrynCooke BrynCooke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!
Only thing would be to add a bit more in the docs about what you can expect in terms of output by using this feature.

Copy link
Contributor

@garypen garypen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, one small change please.

apollo-router/src/plugins/telemetry/mod.rs Outdated Show resolved Hide resolved
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
@bnjjj bnjjj requested a review from garypen August 1, 2022 09:56
@bnjjj bnjjj merged commit 0f226d7 into main Aug 1, 2022
@bnjjj bnjjj deleted the bnjjj/feat_1434 branch August 1, 2022 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add error section in custom attributes configuration
3 participants