Class: GraphQL::Tracing::StatsdTrace::StatsdMonitor
- Inherits:
-
MonitorTrace::Monitor
- Object
- MonitorTrace::Monitor
- GraphQL::Tracing::StatsdTrace::StatsdMonitor
- Defined in:
- lib/graphql/tracing/statsd_trace.rb
Defined Under Namespace
Classes: Event
Constant Summary
Constants included from MonitorTrace::Monitor::GraphQLPrefixNames
MonitorTrace::Monitor::GraphQLPrefixNames::ANALYZE_NAME, MonitorTrace::Monitor::GraphQLPrefixNames::EXECUTE_NAME, MonitorTrace::Monitor::GraphQLPrefixNames::LEX_NAME, MonitorTrace::Monitor::GraphQLPrefixNames::PARSE_NAME, MonitorTrace::Monitor::GraphQLPrefixNames::VALIDATE_NAME
Instance Attribute Summary collapse
-
#statsd ⇒ Object
readonly
Returns the value of attribute statsd.
Instance Method Summary collapse
-
#initialize(statsd:, **_rest) ⇒ StatsdMonitor
constructor
A new instance of StatsdMonitor.
-
#instrument(keyword, object) ⇒ Object
Methods included from MonitorTrace::Monitor::GraphQLPrefixNames
#platform_authorized_key, #platform_field_key, #platform_resolve_type_key, #platform_source_class_key
Methods inherited from MonitorTrace::Monitor
#fallback_transaction_name, #name_for, #start_event, #transaction_name
Constructor Details
#initialize(statsd:, **_rest) ⇒ StatsdMonitor
Returns a new instance of StatsdMonitor.
20 21 22 23 |
# File 'lib/graphql/tracing/statsd_trace.rb', line 20 def initialize(statsd:, **_rest) @statsd = statsd super end |
Instance Attribute Details
#statsd ⇒ Object (readonly)
Returns the value of attribute statsd.
25 26 27 |
# File 'lib/graphql/tracing/statsd_trace.rb', line 25 def statsd @statsd end |
Instance Method Details
#instrument(keyword, object) ⇒ Object
27 28 29 30 31 |
# File 'lib/graphql/tracing/statsd_trace.rb', line 27 def instrument(keyword, object) @statsd.time(name_for(keyword, object)) do yield end end |