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

Add subgraph span attribute for http status code #4614

Open
smyrick opened this issue Feb 7, 2024 · 0 comments
Open

Add subgraph span attribute for http status code #4614

smyrick opened this issue Feb 7, 2024 · 0 comments

Comments

@smyrick
Copy link
Member

smyrick commented Feb 7, 2024

Is your feature request related to a problem? Please describe.
In Router 1.35.0+ you can now configure which span attributes are included. For the router layer we have the following options which includes http.response.status_code

However for subgraph attributes we only have access to the GraphQL metadata like subgraph.graphql.operation.name and so I can't see the HTTP status code of my subgraph calls. The status code was the primarly data needed by a customer but all the HTTP info is also useful.

Describe the solution you'd like
Add the same http options to subgraph span attributes to configure the http information. Some of these maybe should be off by default but allow enabling if needed

telemetry:
  instrumentation:
    spans:
      router:
        attributes:
          # Exists today
          http.response.status_code: true
      subgraph:
        attributes:
          # New features
         http.request.body.size: true
         http.response.status_code: true
         http.response.body.size: true

Describe alternatives you've considered
I can look at the span generated by my subgraph Otel library but Router has this info already, we are just not exposing it

Additional context
This would allow users to more easily build dashboards to help find subgraph errors like auth problems. This is probably an extension of the megaissue #3226

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

1 participant