Module: GraphQL::Tracing
- Defined in:
- lib/graphql/tracing.rb,
lib/graphql/tracing/scout_tracing.rb,
lib/graphql/tracing/data_dog_tracing.rb,
lib/graphql/tracing/platform_tracing.rb,
lib/graphql/tracing/skylight_tracing.rb,
lib/graphql/tracing/appsignal_tracing.rb,
lib/graphql/tracing/new_relic_tracing.rb,
lib/graphql/tracing/active_support_notifications_tracing.rb
Overview
Library entry point for performance metric reporting.
ActiveSupportNotificationsTracing is imported by default
when ActiveSupport::Notifications
is found.
You can remove it with GraphQL::Tracing.uninstall(GraphQL::Tracing::ActiveSupportNotificationsTracing)
.
Warning: Installing/uninstalling tracers is not thread-safe. Do it during application boot only.
Events:
Key | Metadata |
---|---|
lex | { query_string: String } |
parse | { query_string: String } |
validate | { query: GraphQL::Query, validate: Boolean } |
analyze_multiplex | { multiplex: GraphQL::Execution::Multiplex } |
analyze_query | { query: GraphQL::Query } |
execute_multiplex | { multiplex: GraphQL::Execution::Multiplex } |
execute_query | { query: GraphQL::Query } |
execute_query_lazy | { query: GraphQL::Query?, multiplex: GraphQL::Execution::Multiplex? } |
execute_field | { context: GraphQL::Query::Context::FieldResolutionContext } |
execute_field_lazy | { context: GraphQL::Query::Context::FieldResolutionContext } |
Defined Under Namespace
Modules: ActiveSupportNotificationsTracing, NullTracer, Traceable Classes: AppsignalTracing, DataDogTracing, NewRelicTracing, PlatformTracing, ScoutTracing, SkylightTracing
Class Method Summary collapse
-
.install(tracer) ⇒ void
deprecated
Deprecated.
See Schema.tracer or use
context: { tracers: [...] }
-
.tracers ⇒ Object
deprecated
Deprecated.
See Schema.tracer or use
context: { tracers: [...] }
-
.uninstall(tracer) ⇒ Object
deprecated
Deprecated.
See Schema.tracer or use
context: { tracers: [...] }
Class Method Details
.install(tracer) ⇒ void
See Schema.tracer or use context: { tracers: [...] }
This method returns an undefined value.
Install a tracer to receive events.
83 84 85 86 87 88 |
# File 'lib/graphql/tracing.rb', line 83 def install(tracer) warn("GraphQL::Tracing.install is deprecated, add it to the schema with `tracer(my_tracer)` instead.") if !tracers.include?(tracer) @tracers << tracer end end |
.tracers ⇒ Object
See Schema.tracer or use context: { tracers: [...] }
96 97 98 |
# File 'lib/graphql/tracing.rb', line 96 def tracers @tracers ||= [] end |
.uninstall(tracer) ⇒ Object
See Schema.tracer or use context: { tracers: [...] }
91 92 93 |
# File 'lib/graphql/tracing.rb', line 91 def uninstall(tracer) @tracers.delete(tracer) end |