-
-
Notifications
You must be signed in to change notification settings - Fork 578
Open
Description
Feature Request Type
- Core functionality
- Alteration (enhancement/optimization) of existing feature(s)
- New behavior
Description
This blob:
strawberry/strawberry/extensions/tracing/opentelemetry.py
Lines 53 to 68 in 2d4234a
self._operation_name = self.execution_context.operation_name | |
span_name = ( | |
f"GraphQL Query: {self._operation_name}" | |
if self._operation_name | |
else "GraphQL Query" | |
) | |
self._span_holder[LifecycleStep.OPERATION] = self._tracer.start_span( | |
span_name, kind=SpanKind.SERVER | |
) | |
self._span_holder[LifecycleStep.OPERATION].set_attribute("component", "graphql") | |
if self.execution_context.query: | |
self._span_holder[LifecycleStep.OPERATION].set_attribute( | |
"query", self.execution_context.query | |
) |
should probably use graphql.document
, graphql.operation.name
, and graphql.operation.type
, as suggested by upstream: https://opentelemetry.io/docs/specs/semconv/attributes-registry/graphql/
it also appears component
has been deprecated: open-telemetry/opentelemetry-specification#271
need to know:
- if a PR from the community to implement this is desirable (happy to do this if so)
- if the span names need to be unique (i.e., is the operation name in both the span name and
graphql.operation.name
?)
Metadata
Metadata
Assignees
Labels
No labels