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
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
30
31
32
|
# File 'lib/graphql/tracing/scout_tracing.rb', line 30
def platform_field_key(type, field)
"#{type.name}.#{field.name}"
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
|