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

apollo.router.graphql_error: Add subgraph name, operation name #6228

Open
theJC opened this issue Nov 5, 2024 · 1 comment
Open

apollo.router.graphql_error: Add subgraph name, operation name #6228

theJC opened this issue Nov 5, 2024 · 1 comment

Comments

@theJC
Copy link
Contributor

theJC commented Nov 5, 2024

Is your feature request related to a problem? Please describe.

We use apollo.router.graphql_error count for SLOs and monitors, but need to filter by subgraph name and operation name

Describe the solution you'd like

Add subgraph name and operation name tags to apollo.router.graphql_error

Describe alternatives you've considered

Building our own separate metric emanated from our coprocessor, but that would be inconsistent/emanated from a different service.

@bnjjj
Copy link
Contributor

bnjjj commented Nov 18, 2024

I would suggest our instrumentation config to achieve it in a better way.
I think you should keep using the provided http.server.request.duration and configure it:

telemetry:
  instrumentation:
    instruments:
      router:
        http.server.request.duration:
          attributes:
            http.response.status_code: true
            graphql.operation.name: # Will set this attribute with the operation name
              operation_name: string
            graphql.errors: # Will set this attribute to true if it contains graphql error
              on_graphql_error: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants