Documentation ¶
Overview ¶
Package noop provides an implementation of the OpenTelemetry metric API that produces no telemetry and minimizes used computation resources.
Using this package to implement the OpenTelemetry metric API will effectively disable OpenTelemetry.
This implementation can be embedded in other implementations of the OpenTelemetry metric API. Doing so will mean the implementation defaults to no operation for methods it does not implement.
Index ¶
- type Float64Counter
- type Float64Gauge
- type Float64Histogram
- type Float64ObservableCounter
- type Float64ObservableGauge
- type Float64ObservableUpDownCounter
- type Float64Observer
- type Float64UpDownCounter
- type Int64Counter
- type Int64Gauge
- type Int64Histogram
- type Int64ObservableCounter
- type Int64ObservableGauge
- type Int64ObservableUpDownCounter
- type Int64Observer
- type Int64UpDownCounter
- type Meter
- func (Meter) Float64Counter(string, ...metric.Float64CounterOption) (metric.Float64Counter, error)
- func (Meter) Float64Gauge(string, ...metric.Float64GaugeOption) (metric.Float64Gauge, error)
- func (Meter) Float64Histogram(string, ...metric.Float64HistogramOption) (metric.Float64Histogram, error)
- func (Meter) Float64ObservableCounter(string, ...metric.Float64ObservableCounterOption) (metric.Float64ObservableCounter, error)
- func (Meter) Float64ObservableGauge(string, ...metric.Float64ObservableGaugeOption) (metric.Float64ObservableGauge, error)
- func (Meter) Float64ObservableUpDownCounter(string, ...metric.Float64ObservableUpDownCounterOption) (metric.Float64ObservableUpDownCounter, error)
- func (Meter) Float64UpDownCounter(string, ...metric.Float64UpDownCounterOption) (metric.Float64UpDownCounter, error)
- func (Meter) Int64Counter(string, ...metric.Int64CounterOption) (metric.Int64Counter, error)
- func (Meter) Int64Gauge(string, ...metric.Int64GaugeOption) (metric.Int64Gauge, error)
- func (Meter) Int64Histogram(string, ...metric.Int64HistogramOption) (metric.Int64Histogram, error)
- func (Meter) Int64ObservableCounter(string, ...metric.Int64ObservableCounterOption) (metric.Int64ObservableCounter, error)
- func (Meter) Int64ObservableGauge(string, ...metric.Int64ObservableGaugeOption) (metric.Int64ObservableGauge, error)
- func (Meter) Int64ObservableUpDownCounter(string, ...metric.Int64ObservableUpDownCounterOption) (metric.Int64ObservableUpDownCounter, error)
- func (Meter) Int64UpDownCounter(string, ...metric.Int64UpDownCounterOption) (metric.Int64UpDownCounter, error)
- func (Meter) RegisterCallback(metric.Callback, ...metric.Observable) (metric.Registration, error)
- type MeterProvider
- type Observer
- type Registration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Float64Counter ¶
type Float64Counter struct{ embedded.Float64Counter }
Float64Counter is an OpenTelemetry Counter used to record float64 measurements. It produces no telemetry.
type Float64Gauge ¶ added in v1.27.0
type Float64Gauge struct{ embedded.Float64Gauge }
Float64Gauge is an OpenTelemetry Gauge used to record instantaneous float64 measurements. It produces no telemetry.
func (Float64Gauge) Record ¶ added in v1.27.0
func (Float64Gauge) Record(context.Context, float64, ...metric.RecordOption)
Record performs no operation.
type Float64Histogram ¶
type Float64Histogram struct{ embedded.Float64Histogram }
Float64Histogram is an OpenTelemetry Histogram used to record float64 measurements. It produces no telemetry.
func (Float64Histogram) Record ¶
func (Float64Histogram) Record(context.Context, float64, ...metric.RecordOption)
Record performs no operation.
type Float64ObservableCounter ¶
type Float64ObservableCounter struct { metric.Float64Observable embedded.Float64ObservableCounter }
Float64ObservableCounter is an OpenTelemetry ObservableCounter used to record float64 measurements. It produces no telemetry.
type Float64ObservableGauge ¶
type Float64ObservableGauge struct { metric.Float64Observable embedded.Float64ObservableGauge }
Float64ObservableGauge is an OpenTelemetry ObservableGauge used to record float64 measurements. It produces no telemetry.
type Float64ObservableUpDownCounter ¶
type Float64ObservableUpDownCounter struct { metric.Float64Observable embedded.Float64ObservableUpDownCounter }
Float64ObservableUpDownCounter is an OpenTelemetry ObservableUpDownCounter used to record float64 measurements. It produces no telemetry.
type Float64Observer ¶
type Float64Observer struct{ embedded.Float64Observer }
Float64Observer is a recorder of float64 measurements that performs no operation.
func (Float64Observer) Observe ¶
func (Float64Observer) Observe(float64, ...metric.ObserveOption)
Observe performs no operation.
type Float64UpDownCounter ¶
type Float64UpDownCounter struct{ embedded.Float64UpDownCounter }
Float64UpDownCounter is an OpenTelemetry UpDownCounter used to record float64 measurements. It produces no telemetry.
type Int64Counter ¶
type Int64Counter struct{ embedded.Int64Counter }
Int64Counter is an OpenTelemetry Counter used to record int64 measurements. It produces no telemetry.
type Int64Gauge ¶ added in v1.27.0
type Int64Gauge struct{ embedded.Int64Gauge }
Int64Gauge is an OpenTelemetry Gauge used to record instantaneous int64 measurements. It produces no telemetry.
func (Int64Gauge) Record ¶ added in v1.27.0
func (Int64Gauge) Record(context.Context, int64, ...metric.RecordOption)
Record performs no operation.
type Int64Histogram ¶
type Int64Histogram struct{ embedded.Int64Histogram }
Int64Histogram is an OpenTelemetry Histogram used to record int64 measurements. It produces no telemetry.
func (Int64Histogram) Record ¶
func (Int64Histogram) Record(context.Context, int64, ...metric.RecordOption)
Record performs no operation.
type Int64ObservableCounter ¶
type Int64ObservableCounter struct { metric.Int64Observable embedded.Int64ObservableCounter }
Int64ObservableCounter is an OpenTelemetry ObservableCounter used to record int64 measurements. It produces no telemetry.
type Int64ObservableGauge ¶
type Int64ObservableGauge struct { metric.Int64Observable embedded.Int64ObservableGauge }
Int64ObservableGauge is an OpenTelemetry ObservableGauge used to record int64 measurements. It produces no telemetry.
type Int64ObservableUpDownCounter ¶
type Int64ObservableUpDownCounter struct { metric.Int64Observable embedded.Int64ObservableUpDownCounter }
Int64ObservableUpDownCounter is an OpenTelemetry ObservableUpDownCounter used to record int64 measurements. It produces no telemetry.
type Int64Observer ¶
type Int64Observer struct{ embedded.Int64Observer }
Int64Observer is a recorder of int64 measurements that performs no operation.
func (Int64Observer) Observe ¶
func (Int64Observer) Observe(int64, ...metric.ObserveOption)
Observe performs no operation.
type Int64UpDownCounter ¶
type Int64UpDownCounter struct{ embedded.Int64UpDownCounter }
Int64UpDownCounter is an OpenTelemetry UpDownCounter used to record int64 measurements. It produces no telemetry.
type Meter ¶
Meter is an OpenTelemetry No-Op Meter.
func (Meter) Float64Counter ¶
func (Meter) Float64Counter(string, ...metric.Float64CounterOption) (metric.Float64Counter, error)
Float64Counter returns a Counter used to record int64 measurements that produces no telemetry.
func (Meter) Float64Gauge ¶ added in v1.27.0
func (Meter) Float64Gauge(string, ...metric.Float64GaugeOption) (metric.Float64Gauge, error)
Float64Gauge returns a Gauge used to record float64 measurements that produces no telemetry.
func (Meter) Float64Histogram ¶
func (Meter) Float64Histogram(string, ...metric.Float64HistogramOption) (metric.Float64Histogram, error)
Float64Histogram returns a Histogram used to record int64 measurements that produces no telemetry.
func (Meter) Float64ObservableCounter ¶
func (Meter) Float64ObservableCounter(string, ...metric.Float64ObservableCounterOption) (metric.Float64ObservableCounter, error)
Float64ObservableCounter returns an ObservableCounter used to record int64 measurements that produces no telemetry.
func (Meter) Float64ObservableGauge ¶
func (Meter) Float64ObservableGauge(string, ...metric.Float64ObservableGaugeOption) (metric.Float64ObservableGauge, error)
Float64ObservableGauge returns an ObservableGauge used to record int64 measurements that produces no telemetry.
func (Meter) Float64ObservableUpDownCounter ¶
func (Meter) Float64ObservableUpDownCounter(string, ...metric.Float64ObservableUpDownCounterOption) (metric.Float64ObservableUpDownCounter, error)
Float64ObservableUpDownCounter returns an ObservableUpDownCounter used to record int64 measurements that produces no telemetry.
func (Meter) Float64UpDownCounter ¶
func (Meter) Float64UpDownCounter(string, ...metric.Float64UpDownCounterOption) (metric.Float64UpDownCounter, error)
Float64UpDownCounter returns an UpDownCounter used to record int64 measurements that produces no telemetry.
func (Meter) Int64Counter ¶
func (Meter) Int64Counter(string, ...metric.Int64CounterOption) (metric.Int64Counter, error)
Int64Counter returns a Counter used to record int64 measurements that produces no telemetry.
func (Meter) Int64Gauge ¶ added in v1.27.0
func (Meter) Int64Gauge(string, ...metric.Int64GaugeOption) (metric.Int64Gauge, error)
Int64Gauge returns a Gauge used to record int64 measurements that produces no telemetry.
func (Meter) Int64Histogram ¶
func (Meter) Int64Histogram(string, ...metric.Int64HistogramOption) (metric.Int64Histogram, error)
Int64Histogram returns a Histogram used to record int64 measurements that produces no telemetry.
func (Meter) Int64ObservableCounter ¶
func (Meter) Int64ObservableCounter(string, ...metric.Int64ObservableCounterOption) (metric.Int64ObservableCounter, error)
Int64ObservableCounter returns an ObservableCounter used to record int64 measurements that produces no telemetry.
func (Meter) Int64ObservableGauge ¶
func (Meter) Int64ObservableGauge(string, ...metric.Int64ObservableGaugeOption) (metric.Int64ObservableGauge, error)
Int64ObservableGauge returns an ObservableGauge used to record int64 measurements that produces no telemetry.
func (Meter) Int64ObservableUpDownCounter ¶
func (Meter) Int64ObservableUpDownCounter(string, ...metric.Int64ObservableUpDownCounterOption) (metric.Int64ObservableUpDownCounter, error)
Int64ObservableUpDownCounter returns an ObservableUpDownCounter used to record int64 measurements that produces no telemetry.
func (Meter) Int64UpDownCounter ¶
func (Meter) Int64UpDownCounter(string, ...metric.Int64UpDownCounterOption) (metric.Int64UpDownCounter, error)
Int64UpDownCounter returns an UpDownCounter used to record int64 measurements that produces no telemetry.
func (Meter) RegisterCallback ¶
func (Meter) RegisterCallback(metric.Callback, ...metric.Observable) (metric.Registration, error)
RegisterCallback performs no operation.
type MeterProvider ¶
type MeterProvider struct{ embedded.MeterProvider }
MeterProvider is an OpenTelemetry No-Op MeterProvider.
func NewMeterProvider ¶
func NewMeterProvider() MeterProvider
NewMeterProvider returns a MeterProvider that does not record any telemetry.
func (MeterProvider) Meter ¶
func (MeterProvider) Meter(string, ...metric.MeterOption) metric.Meter
Meter returns an OpenTelemetry Meter that does not record any telemetry.
type Observer ¶
Observer acts as a recorder of measurements for multiple instruments in a Callback, it performing no operation.
func (Observer) ObserveFloat64 ¶
func (Observer) ObserveFloat64(metric.Float64Observable, float64, ...metric.ObserveOption)
ObserveFloat64 performs no operation.
func (Observer) ObserveInt64 ¶
func (Observer) ObserveInt64(metric.Int64Observable, int64, ...metric.ObserveOption)
ObserveInt64 performs no operation.
type Registration ¶
type Registration struct{ embedded.Registration }
Registration is the registration of a Callback with a No-Op Meter.
func (Registration) Unregister ¶
func (Registration) Unregister() error
Unregister unregisters the Callback the Registration represents with the No-Op Meter. This will always return nil because the No-Op Meter performs no operation, including hold any record of registrations.