Class: GraphQL::Tracing::ScoutTracing
- Inherits:
-
PlatformTracing
- Object
- PlatformTracing
- GraphQL::Tracing::ScoutTracing
- Defined in:
- lib/graphql/tracing/scout_tracing.rb
Constant Summary
- INSTRUMENT_OPTS =
{ scope: true }
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ ScoutTracing
constructor
A new instance of ScoutTracing.
-
#platform_field_key(type, field) ⇒ Object
-
#platform_trace(platform_key, key, data) ⇒ Object
Methods inherited from PlatformTracing
#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( = {}) self.class.include ScoutApm::Tracer super() end |
Instance Method Details
#platform_field_key(type, field) ⇒ Object
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 |
#platform_trace(platform_key, key, data) ⇒ Object
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 |