Module: GraphQL::Tracing::StatsdTrace
- Includes:
- PlatformTrace
- Defined in:
- lib/graphql/tracing/statsd_trace.rb
Instance Method Summary
collapse
#platform_authorized_lazy, #platform_execute_field_lazy, #platform_resolve_type_lazy
Instance Method Details
#initialize(statsd:, **rest) ⇒ Object
11
12
13
14
|
# File 'lib/graphql/tracing/statsd_trace.rb', line 11
def initialize(statsd:, **rest)
@statsd = statsd
super(**rest)
end
|
39
40
41
|
# File 'lib/graphql/tracing/statsd_trace.rb', line 39
def platform_authorized(key, &block)
@statsd.time(key, &block)
end
|
49
50
51
|
# File 'lib/graphql/tracing/statsd_trace.rb', line 49
def platform_authorized_key(type)
"graphql.authorized.#{type.graphql_name}"
end
|
35
36
37
|
# File 'lib/graphql/tracing/statsd_trace.rb', line 35
def platform_execute_field(platform_key, &block)
@statsd.time(platform_key, &block)
end
|
45
46
47
|
# File 'lib/graphql/tracing/statsd_trace.rb', line 45
def platform_field_key(field)
"graphql.#{field.path}"
end
|
53
54
55
|
# File 'lib/graphql/tracing/statsd_trace.rb', line 53
def platform_resolve_type_key(type)
"graphql.resolve_type.#{type.graphql_name}"
end
|