Class: GraphQL::Tracing::ScoutTracing
Constant Summary
collapse
- INSTRUMENT_OPTS =
{ scope: true }
Instance Method Summary
collapse
#instrument, #trace, #trace_field, use
Constructor Details
#initialize(options = {}) ⇒ ScoutTracing
Returns a new instance of ScoutTracing.
19
20
21
22
|
# File 'lib/graphql/tracing/scout_tracing.rb', line 19
def initialize(options = {})
self.class.include ScoutApm::Tracer
super(options)
end
|
Instance Method Details
34
35
36
|
# File 'lib/graphql/tracing/scout_tracing.rb', line 34
def platform_authorized_key(type)
"#{type.graphql_name}.authorized"
end
|
30
31
32
|
# File 'lib/graphql/tracing/scout_tracing.rb', line 30
def platform_field_key(type, field)
"#{type.graphql_name}.#{field.graphql_name}"
end
|
38
39
40
|
# File 'lib/graphql/tracing/scout_tracing.rb', line 38
def platform_resolve_type_key(type)
"#{type.graphql_name}.resolve_type"
end
|
24
25
26
27
28
|
# File 'lib/graphql/tracing/scout_tracing.rb', line 24
def platform_trace(platform_key, key, data)
self.class.instrument("GraphQL", platform_key, INSTRUMENT_OPTS) do
yield
end
end
|