Module: Skylight::Probes::GraphQL::InstrumentationV2::ClassMethods Private

Defined in:
lib/skylight/probes/graphql.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#new_traceObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/skylight/probes/graphql.rb', line 81

def new_trace(*, **)
  unless @__sk_instrumentation_installed
    trace_with(::GraphQL::Tracing::ActiveSupportNotificationsTrace)

    unless ::GraphQL::Tracing::ActiveSupportNotificationsTrace.instance_methods.include?(:execute_multiplex)
      trace_with(ExecuteMultiplexNotification)
    end

    unless ::GraphQL::Tracing::ActiveSupportNotificationsTrace.instance_methods.include?(:execute_query)
      trace_with(ExecuteQueryNotification)
    end

    unless ::GraphQL::Tracing::ActiveSupportNotificationsTrace.instance_methods.include?(:execute_query_lazy)
      trace_with(ExecuteQueryLazyNotification)
    end

    unless ::GraphQL::Tracing::ActiveSupportNotificationsTrace.instance_methods.include?(:analyze_query)
      trace_with(AnalyzeQueryNotification)
    end

    @__sk_instrumentation_installed = true
  end

  super
end