-
Notifications
You must be signed in to change notification settings - Fork 28
Add support for W3C Trace Context in graphql requests #645
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
Conversation
Also catch and wrap TransportServerError to add the trace ID in the logged error.
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.
Pull request overview
This PR adds support for W3C Trace Context in GraphQL requests by implementing traceparent header generation and improving error handling to include trace IDs in logged errors.
Changes:
- Implemented W3C Trace Context traceparent header generation with non-zero validation
- Updated GraphQL client to include traceparent headers in requests
- Enhanced error handling to catch TransportServerError and use traceparent as fallback support ID
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| dagshub/common/tracing.py | New module implementing W3C Trace Context traceparent generation with proper validation |
| dagshub/data_engine/client/data_client.py | Updated GraphQL execution to add traceparent headers and improved error handling with fallback to trace ID |
| dagshub/common/config.py | Added configuration flag to allow disabling traceparent functionality |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Also catch and wrap TransportServerError to add the trace ID in the logged error.