Docs
General
Types
Guides
Editor integration
Concepts
Integrations
Operations
Tracing
Apollo
To enable Apollo tracing you can use the ApolloTracingExtension provided:
from strawberry.extensions.tracing import ApolloTracingExtensionschema = strawberry.Schema(query=Query, extensions=[ApolloTracingExtension])
Note that if you're not running under ASGI you'd need to use the sync version of ApolloTracingExtension:
from strawberry.extensions.tracing import ApolloTracingExtensionSyncschema = strawberry.Schema(query=Query, extensions=[ApolloTracingExtensionSync])
Open Telemetry
In addition to Apollo Tracing we also support opentelemetry, using the OpenTelemetryExtension.
You also need to install the extras for opentelemetry by doing:
pip install strawberry-graphql[opentelemetry]
from strawberry.extensions.tracing import OpenTelemetryExtensionschema = strawberry.Schema(query=Query, extensions=[OpenTelemetryExtension])
Note that if you're not running under ASGI you'd need to use the sync version of OpenTelemetryExtension:
from strawberry.extensions.tracing import OpenTelemetryExtensionSyncschema = strawberry.Schema(query=Query, extensions=[OpenTelemetryExtensionSync])