Module: GraphQL::Tracing::ScoutTrace
- Includes:
- PlatformTrace
- Defined in:
- lib/graphql/tracing/scout_trace.rb
Constant Summary
collapse
- INSTRUMENT_OPTS =
{ scope: true }
Instance Method Summary
collapse
#platform_authorized_lazy, #platform_execute_field_lazy, #platform_resolve_type_lazy
Instance Method Details
#initialize(set_transaction_name: false, **_rest) ⇒ Object
13
14
15
16
17
|
# File 'lib/graphql/tracing/scout_trace.rb', line 13
def initialize(set_transaction_name: false, **_rest)
self.class.include(ScoutApm::Tracer)
@set_transaction_name = set_transaction_name
super
end
|
53
54
55
|
# File 'lib/graphql/tracing/scout_trace.rb', line 53
def platform_authorized(platform_key, &block)
self.class.instrument("GraphQL", platform_key, INSTRUMENT_OPTS, &block)
end
|
63
64
65
|
# File 'lib/graphql/tracing/scout_trace.rb', line 63
def platform_authorized_key(type)
"#{type.graphql_name}.authorized"
end
|
49
50
51
|
# File 'lib/graphql/tracing/scout_trace.rb', line 49
def platform_execute_field(platform_key, &block)
self.class.instrument("GraphQL", platform_key, INSTRUMENT_OPTS, &block)
end
|
59
60
61
|
# File 'lib/graphql/tracing/scout_trace.rb', line 59
def platform_field_key(field)
field.path
end
|
67
68
69
|
# File 'lib/graphql/tracing/scout_trace.rb', line 67
def platform_resolve_type_key(type)
"#{type.graphql_name}.resolve_type"
end
|