py_gql.tracers#
Collection of useful tracers implementations.
-
class
py_gql.tracers.
TimingTracer
[source]# Bases:
py_gql.execution.instrumentation.Instrumentation
Default implementation for tracers that collect GraphQL execution timing.
This uses
datetime
module and all times are collected as UTC.-
on_execution_end
()[source]# This will be after operation execution ends and the execution result is ready.
-
on_field_end
(_root, _ctx, info)[source]# This will be called after field resolution ends.
Return type: None
-
on_field_start
(_root, _ctx, info)[source]# This will be called before field resolution starts.
Return type: None
-
on_parsing_end
()[source]# This will be called after the request document has been parsed.
This is called even if parsing failed due to a syntax error.
-
-
class
py_gql.tracers.
ApolloTracer
[source]# Bases:
py_gql.tracers.TimingTracer
,py_gql.execution.wrappers.GraphQLExtension
Tracer implementation compatible with the Apollo Tracing specification.
This tracers also implements
py_gql.GraphQLExtension
in order to be included in the response according to the specification.