Module: OpenTelemetry::SDK::Trace::Export::MetricsReporter
- Extended by:
- MetricsReporter
- Included in:
- MetricsReporter
- Defined in:
- lib/opentelemetry/sdk/trace/export/metrics_reporter.rb
Overview
MetricsReporter defines an interface used for reporting metrics from span processors (like the BatchSpanProcessor) and exporters. It can be used to report metrics such as dropped spans, and successful and failed export attempts. This exists to decouple the Trace SDK from the unstable OpenTelemetry Metrics API. An example implementation in terms of StatsD is:
Instance Method Summary collapse
-
#add_to_counter(metric, increment: 1, labels: {}) ⇒ Object
Adds an increment to a metric with the provided labels.
-
#observe_value(metric, value:, labels: {}) ⇒ Object
Observes a value for a metric with the provided labels.
-
#record_value(metric, value:, labels: {}) ⇒ Object
Records a value for a metric with the provided labels.
Instance Method Details
#add_to_counter(metric, increment: 1, labels: {}) ⇒ Object
Adds an increment to a metric with the provided labels.
39 |
# File 'lib/opentelemetry/sdk/trace/export/metrics_reporter.rb', line 39 def add_to_counter(metric, increment: 1, labels: {}); end |
#observe_value(metric, value:, labels: {}) ⇒ Object
Observes a value for a metric with the provided labels.
55 |
# File 'lib/opentelemetry/sdk/trace/export/metrics_reporter.rb', line 55 def observe_value(metric, value:, labels: {}); end |
#record_value(metric, value:, labels: {}) ⇒ Object
Records a value for a metric with the provided labels.
47 |
# File 'lib/opentelemetry/sdk/trace/export/metrics_reporter.rb', line 47 def record_value(metric, value:, labels: {}); end |