module GraphQL::Tracing
Constants
- AppsignalTrace
-
Instrumentation for reporting GraphQL-Ruby times to Appsignal.
Examples
Example: Installing the tracer
class MySchema < GraphQL::Schema trace_with GraphQL::Tracing::AppsignalTrace end
- DataDogTrace
-
A tracer for reporting to DataDog
Examples
Example: Adding this tracer to your schema
class MySchema < GraphQL::Schema trace_with GraphQL::Tracing::DataDogTrace end
Example: Skipping
resolve_typeandauthorizedeventstrace_with GraphQL::Tracing::DataDogTrace, trace_authorized: false, trace_resolve_type: false
- NewRelicTrace
-
A tracer for reporting GraphQL-Ruby time to New Relic
Examples
Example: Installing the tracer
class MySchema < GraphQL::Schema trace_with GraphQL::Tracing::NewRelicTrace # Optional, use the operation name to set the new relic transaction name: # trace_with GraphQL::Tracing::NewRelicTrace, set_transaction_name: true end
Example: Installing without trace events for
authorized?orresolve_typecallstrace_with GraphQL::Tracing::NewRelicTrace, trace_authorized: false, trace_resolve_type: false
- NullTrace
- PrometheusTrace
-
A tracer for reporting GraphQL-Ruby times to Prometheus.
The PrometheusExporter server must be run with a custom type collector that extends
GraphQL::Tracing::PrometheusTracing::GraphQLCollector.Examples
Example: Adding this trace to your schema
require 'prometheus_exporter/client' class MySchema < GraphQL::Schema trace_with GraphQL::Tracing::PrometheusTrace end
Example: Running a custom type collector
# lib/graphql_collector.rb if defined?(PrometheusExporter::Server) require 'graphql/tracing' class GraphQLCollector < GraphQL::Tracing::PrometheusTrace::GraphQLCollector end end # Then run: # bundle exec prometheus_exporter -a lib/graphql_collector.rb
- ScoutTrace
-
A tracer for sending GraphQL-Ruby times to Scout
Examples
Example: Adding this tracer to your schema
class MySchema < GraphQL::Schema trace_with GraphQL::Tracing::ScoutTrace end
- SentryTrace
-
A tracer for reporting GraphQL-Ruby times to Sentry.
See
MonitorTraceConfiguration Options in the parent moduleExamples
Example: Installing the tracer
class MySchema < GraphQL::Schema trace_with GraphQL::Tracing::SentryTrace end
- StatsdTrace
-
A tracer for reporting GraphQL-Ruby times to Statsd. Passing any Statsd client that implements
.time(name) { ... }and.timing(name, ms)will work.Examples
Example: Installing this tracer
# eg: # $statsd = Statsd.new 'localhost', 9125 class MySchema < GraphQL::Schema use GraphQL::Tracing::StatsdTrace, statsd: $statsd end