-
-
Notifications
You must be signed in to change notification settings - Fork 555
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
opentelemetry: use semconv attributes #3786
base: main
Are you sure you want to change the base?
Conversation
Reviewer's Guide by SourceryThis pull request updates the OpenTelemetry extension to use semantic convention attributes, sets the GraphQL operation name and type as span attributes, and stops setting the deprecated Sequence diagram for GraphQL operation tracing with OpenTelemetrysequenceDiagram
participant Client
participant Strawberry
participant OpenTelemetryTracer as Tracer
Client->>Strawberry: Sends GraphQL request
Strawberry->>Tracer: Start span (SERVER)
Tracer-->>Strawberry: Span started
Strawberry->>Tracer: Set attribute graphql.operation.name
Strawberry->>Tracer: Set attribute graphql.document
Strawberry-->>Strawberry: Executes GraphQL operation
Strawberry->>Tracer: Set attribute graphql.operation.name (if not already set)
Strawberry->>Tracer: Set attribute graphql.operation.type
Strawberry->>Tracer: End span
Tracer-->>Strawberry: Span ended
Strawberry-->>Client: Returns result
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
* use attributes defined in opentelemetry's semconv * stop setting span attribute `component`, as that's been deprecated * fixes strawberry-graphql#3769
4c0a96f
to
d6ea4c5
Compare
Thanks for adding the Here's a preview of the changelog: Use OTEL's semconv attribute registry for span attributes. Stops setting Here's the tweet text:
|
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.
Hey @guppy0130 - I've reviewed your changes - here's some feedback:
Overall Comments:
- It might be worth adding a test case that verifies the
GRAPHQL_OPERATION_TYPE
attribute is set correctly when the operation type is a mutation or subscription.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
opentelemetry: use semconv attributes
Description
component
, as that's been deprecatedTypes of Changes
Issues Fixed or Closed by This PR
Checklist
Summary by Sourcery
Updates the OpenTelemetry extension to use semantic convention attributes, set the GraphQL operation name and type as span attributes, and stop setting the deprecated
component
span attribute.Bug Fixes:
component
span attribute.Enhancements:
Tests:
Summary by Sourcery
Updates the OpenTelemetry extension to use semantic convention attributes, set the GraphQL operation name and type as span attributes, and stop setting the deprecated
component
span attribute.Bug Fixes:
component
span attribute.Enhancements:
Tests: