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_authorized_key(type) ⇒ Object


27
28
29
# File 'lib/graphql/tracing/appsignal_tracing.rb', line 27

def platform_authorized_key(type)
  "#{type.graphql_name}.authorized.graphql"
end

#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_resolve_type_key(type) ⇒ Object


31
32
33
# File 'lib/graphql/tracing/appsignal_tracing.rb', line 31

def platform_resolve_type_key(type)
  "#{type.graphql_name}.resolve_type.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