Class: GraphQL::Tracing::AppsignalTracing

Inherits:
PlatformTracing show all
Defined in:
lib/graphql/tracing/appsignal_tracing.rb

Instance Method Summary collapse

Methods inherited from PlatformTracing

#initialize, #instrument, #trace, #trace_field, use

Constructor Details

This class inherits a constructor from GraphQL::Tracing::PlatformTracing

Instance Method Details

#platform_field_key(type, field) ⇒ Object



23
24
25
# File 'lib/graphql/tracing/appsignal_tracing.rb', line 23

def platform_field_key(type, field)
  "#{type.graphql_name}.#{field.graphql_name}.graphql"
end

#platform_trace(platform_key, key, data) ⇒ Object



17
18
19
20
21
# File 'lib/graphql/tracing/appsignal_tracing.rb', line 17

def platform_trace(platform_key, key, data)
  Appsignal.instrument(platform_key) do
    yield
  end
end