Class: Datadog::Statsd::Schema::SchemaBuilder::MetricsBuilder Private
- Inherits:
-
Object
- Object
- Datadog::Statsd::Schema::SchemaBuilder::MetricsBuilder
- Defined in:
- lib/datadog/statsd/schema/schema_builder.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Helper class for building metrics within a namespace
Instance Method Summary collapse
-
#initialize(metrics, transformers) ⇒ MetricsBuilder
constructor
private
Initialize with metrics hash and transformers.
-
#namespace(name) { ... } ⇒ void
private
Define a nested namespace for metrics.
Constructor Details
#initialize(metrics, transformers) ⇒ MetricsBuilder
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize with metrics hash and transformers
249 250 251 252 253 |
# File 'lib/datadog/statsd/schema/schema_builder.rb', line 249 def initialize(metrics, transformers) @metrics = metrics @transformers = transformers @current_namespace = nil end |
Instance Method Details
#namespace(name) { ... } ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Define a nested namespace for metrics
259 260 261 262 263 |
# File 'lib/datadog/statsd/schema/schema_builder.rb', line 259 def namespace(name, &) @current_namespace = name.to_sym instance_eval(&) @current_namespace = nil end |