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

use semantic conventions for http status code as a span attribute #175

Open
esara opened this issue Jan 27, 2024 · 1 comment
Open

use semantic conventions for http status code as a span attribute #175

esara opened this issue Jan 27, 2024 · 1 comment

Comments

@esara
Copy link
Contributor

esara commented Jan 27, 2024

the current otel trace instrumentation does not set the http status code for the graphql response
as it is condition required if received as per https://opentelemetry.io/docs/specs/semconv/http/http-spans/#common-attributes

@ravilushqa
Copy link
Owner

Hello @esara, sorry for the delayed response—I was thinking about how best to approach this. I appreciate the contribution, but I’m not sure adding HTTP status codes to GraphQL spans is the right fit for the library. Since GraphQL operates over HTTP and often returns errors with 200 OK responses, logging HTTP status codes could be misleading. Errors are typically handled in the response body rather than the status code itself.

I’m open to further discussion if you have other ideas. Thanks again for your efforts!

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

No branches or pull requests

2 participants