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
9
10
11
12
|
# File 'lib/graphql/tracing/statsd_trace.rb', line 9
def initialize(statsd:, **rest)
@statsd = statsd
super(**rest)
end
|
37
38
39
|
# File 'lib/graphql/tracing/statsd_trace.rb', line 37
def platform_authorized(key, &block)
@statsd.time(key, &block)
end
|
47
48
49
|
# File 'lib/graphql/tracing/statsd_trace.rb', line 47
def platform_authorized_key(type)
"graphql.authorized.#{type.graphql_name}"
end
|
33
34
35
|
# File 'lib/graphql/tracing/statsd_trace.rb', line 33
def platform_execute_field(platform_key, &block)
@statsd.time(platform_key, &block)
end
|
43
44
45
|
# File 'lib/graphql/tracing/statsd_trace.rb', line 43
def platform_field_key(field)
"graphql.#{field.path}"
end
|
51
52
53
|
# File 'lib/graphql/tracing/statsd_trace.rb', line 51
def platform_resolve_type_key(type)
"graphql.resolve_type.#{type.graphql_name}"
end
|