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
15
16
17
18
19
|
# File 'lib/graphql/tracing/scout_trace.rb', line 15
def initialize(set_transaction_name: false, **_rest)
self.class.include(ScoutApm::Tracer)
@set_transaction_name = set_transaction_name
super
end
|
55
56
57
|
# File 'lib/graphql/tracing/scout_trace.rb', line 55
def platform_authorized(platform_key, &block)
self.class.instrument("GraphQL", platform_key, INSTRUMENT_OPTS, &block)
end
|
65
66
67
|
# File 'lib/graphql/tracing/scout_trace.rb', line 65
def platform_authorized_key(type)
"#{type.graphql_name}.authorized"
end
|
51
52
53
|
# File 'lib/graphql/tracing/scout_trace.rb', line 51
def platform_execute_field(platform_key, &block)
self.class.instrument("GraphQL", platform_key, INSTRUMENT_OPTS, &block)
end
|
61
62
63
|
# File 'lib/graphql/tracing/scout_trace.rb', line 61
def platform_field_key(field)
field.path
end
|
69
70
71
|
# File 'lib/graphql/tracing/scout_trace.rb', line 69
def platform_resolve_type_key(type)
"#{type.graphql_name}.resolve_type"
end
|