Documentation
¶
Overview ¶
Package metrics defines the metrics APIs used by Smithy clients.
Index ¶
- type AsyncInstrument
- type Float64Callback
- type Float64Counter
- type Float64Gauge
- type Float64Histogram
- type Float64Observer
- type Float64UpDownCounter
- type InstrumentOption
- type InstrumentOptions
- type Int64Callback
- type Int64Counter
- type Int64Gauge
- type Int64Histogram
- type Int64Observer
- type Int64UpDownCounter
- type Meter
- type MeterOption
- type MeterOptions
- type MeterProvider
- type NopMeter
- func (NopMeter) Float64AsyncCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error)
- func (NopMeter) Float64AsyncGauge(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error)
- func (NopMeter) Float64AsyncUpDownCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error)
- func (NopMeter) Float64Counter(string, ...InstrumentOption) (Float64Counter, error)
- func (NopMeter) Float64Gauge(string, ...InstrumentOption) (Float64Gauge, error)
- func (NopMeter) Float64Histogram(string, ...InstrumentOption) (Float64Histogram, error)
- func (NopMeter) Float64UpDownCounter(string, ...InstrumentOption) (Float64UpDownCounter, error)
- func (NopMeter) Int64AsyncCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error)
- func (NopMeter) Int64AsyncGauge(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error)
- func (NopMeter) Int64AsyncUpDownCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error)
- func (NopMeter) Int64Counter(string, ...InstrumentOption) (Int64Counter, error)
- func (NopMeter) Int64Gauge(string, ...InstrumentOption) (Int64Gauge, error)
- func (NopMeter) Int64Histogram(string, ...InstrumentOption) (Int64Histogram, error)
- func (NopMeter) Int64UpDownCounter(string, ...InstrumentOption) (Int64UpDownCounter, error)
- type NopMeterProvider
- type RecordMetricOption
- type RecordMetricOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncInstrument ¶
type AsyncInstrument interface {
Stop()
}
AsyncInstrument is the universal handle returned for creation of all async instruments.
Callers use the Stop() API to unregister the callback passed at instrument creation.
type Float64Callback ¶
type Float64Callback func(context.Context, Float64Observer)
Float64Callback describes a function invoked when an async float64 instrument is read.
type Float64Counter ¶
type Float64Counter interface {
Add(context.Context, float64, ...RecordMetricOption)
}
Float64Counter measures a monotonically increasing float64 value.
type Float64Gauge ¶
type Float64Gauge interface {
Sample(context.Context, float64, ...RecordMetricOption)
}
Float64Gauge samples a discrete float64 value.
type Float64Histogram ¶
type Float64Histogram interface {
Record(context.Context, float64, ...RecordMetricOption)
}
Float64Histogram records multiple data points for an float64 value.
type Float64Observer ¶
type Float64Observer interface {
Observe(context.Context, float64, ...RecordMetricOption)
}
Float64Observer is the interface passed to async int64 instruments.
Callers use the Observe() API of this interface to report metrics to the underlying collector.
type Float64UpDownCounter ¶
type Float64UpDownCounter interface {
Add(context.Context, float64, ...RecordMetricOption)
}
Float64UpDownCounter measures a fluctuating float64 value.
type InstrumentOption ¶
type InstrumentOption func(o *InstrumentOptions)
InstrumentOption applies configuration to an instrument.
type InstrumentOptions ¶
InstrumentOptions represents configuration for an instrument.
type Int64Callback ¶
type Int64Callback func(context.Context, Int64Observer)
Int64Callback describes a function invoked when an async int64 instrument is read.
type Int64Counter ¶
type Int64Counter interface {
Add(context.Context, int64, ...RecordMetricOption)
}
Int64Counter measures a monotonically increasing int64 value.
type Int64Gauge ¶
type Int64Gauge interface {
Sample(context.Context, int64, ...RecordMetricOption)
}
Int64Gauge samples a discrete int64 value.
type Int64Histogram ¶
type Int64Histogram interface {
Record(context.Context, int64, ...RecordMetricOption)
}
Int64Histogram records multiple data points for an int64 value.
type Int64Observer ¶
type Int64Observer interface {
Observe(context.Context, int64, ...RecordMetricOption)
}
Int64Observer is the interface passed to async int64 instruments.
Callers use the Observe() API of this interface to report metrics to the underlying collector.
type Int64UpDownCounter ¶
type Int64UpDownCounter interface {
Add(context.Context, int64, ...RecordMetricOption)
}
Int64UpDownCounter measures a fluctuating int64 value.
type Meter ¶
type Meter interface {
// integer/synchronous
Int64Counter(name string, opts ...InstrumentOption) (Int64Counter, error)
Int64UpDownCounter(name string, opts ...InstrumentOption) (Int64UpDownCounter, error)
Int64Gauge(name string, opts ...InstrumentOption) (Int64Gauge, error)
Int64Histogram(name string, opts ...InstrumentOption) (Int64Histogram, error)
// integer/asynchronous
Int64AsyncCounter(name string, callback Int64Callback, opts ...InstrumentOption) (AsyncInstrument, error)
Int64AsyncUpDownCounter(name string, callback Int64Callback, opts ...InstrumentOption) (AsyncInstrument, error)
Int64AsyncGauge(name string, callback Int64Callback, opts ...InstrumentOption) (AsyncInstrument, error)
// floating-point/synchronous
Float64Counter(name string, opts ...InstrumentOption) (Float64Counter, error)
Float64UpDownCounter(name string, opts ...InstrumentOption) (Float64UpDownCounter, error)
Float64Gauge(name string, opts ...InstrumentOption) (Float64Gauge, error)
Float64Histogram(name string, opts ...InstrumentOption) (Float64Histogram, error)
// floating-point/asynchronous
Float64AsyncCounter(name string, callback Float64Callback, opts ...InstrumentOption) (AsyncInstrument, error)
Float64AsyncUpDownCounter(name string, callback Float64Callback, opts ...InstrumentOption) (AsyncInstrument, error)
Float64AsyncGauge(name string, callback Float64Callback, opts ...InstrumentOption) (AsyncInstrument, error)
}
Meter is the entry point for creation of measurement instruments.
type MeterOption ¶
type MeterOption func(o *MeterOptions)
MeterOption applies configuration to a Meter.
type MeterOptions ¶
type MeterOptions struct {
Properties smithy.Properties
}
MeterOptions represents configuration for a Meter.
type MeterProvider ¶
type MeterProvider interface {
Meter(scope string, opts ...MeterOption) Meter
}
MeterProvider is the entry point for creating a Meter.
type NopMeter ¶ added in v1.23.2
type NopMeter struct{}
NopMeter creates no-op instruments.
func (NopMeter) Float64AsyncCounter ¶ added in v1.23.2
func (NopMeter) Float64AsyncCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error)
Float64AsyncCounter creates a no-op instrument.
func (NopMeter) Float64AsyncGauge ¶ added in v1.23.2
func (NopMeter) Float64AsyncGauge(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error)
Float64AsyncGauge creates a no-op instrument.
func (NopMeter) Float64AsyncUpDownCounter ¶ added in v1.23.2
func (NopMeter) Float64AsyncUpDownCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error)
Float64AsyncUpDownCounter creates a no-op instrument.
func (NopMeter) Float64Counter ¶ added in v1.23.2
func (NopMeter) Float64Counter(string, ...InstrumentOption) (Float64Counter, error)
Float64Counter creates a no-op instrument.
func (NopMeter) Float64Gauge ¶ added in v1.23.2
func (NopMeter) Float64Gauge(string, ...InstrumentOption) (Float64Gauge, error)
Float64Gauge creates a no-op instrument.
func (NopMeter) Float64Histogram ¶ added in v1.23.2
func (NopMeter) Float64Histogram(string, ...InstrumentOption) (Float64Histogram, error)
Float64Histogram creates a no-op instrument.
func (NopMeter) Float64UpDownCounter ¶ added in v1.23.2
func (NopMeter) Float64UpDownCounter(string, ...InstrumentOption) (Float64UpDownCounter, error)
Float64UpDownCounter creates a no-op instrument.
func (NopMeter) Int64AsyncCounter ¶ added in v1.23.2
func (NopMeter) Int64AsyncCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error)
Int64AsyncCounter creates a no-op instrument.
func (NopMeter) Int64AsyncGauge ¶ added in v1.23.2
func (NopMeter) Int64AsyncGauge(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error)
Int64AsyncGauge creates a no-op instrument.
func (NopMeter) Int64AsyncUpDownCounter ¶ added in v1.23.2
func (NopMeter) Int64AsyncUpDownCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error)
Int64AsyncUpDownCounter creates a no-op instrument.
func (NopMeter) Int64Counter ¶ added in v1.23.2
func (NopMeter) Int64Counter(string, ...InstrumentOption) (Int64Counter, error)
Int64Counter creates a no-op instrument.
func (NopMeter) Int64Gauge ¶ added in v1.23.2
func (NopMeter) Int64Gauge(string, ...InstrumentOption) (Int64Gauge, error)
Int64Gauge creates a no-op instrument.
func (NopMeter) Int64Histogram ¶ added in v1.23.2
func (NopMeter) Int64Histogram(string, ...InstrumentOption) (Int64Histogram, error)
Int64Histogram creates a no-op instrument.
func (NopMeter) Int64UpDownCounter ¶ added in v1.23.2
func (NopMeter) Int64UpDownCounter(string, ...InstrumentOption) (Int64UpDownCounter, error)
Int64UpDownCounter creates a no-op instrument.
type NopMeterProvider ¶
type NopMeterProvider struct{}
NopMeterProvider is a no-op metrics implementation.
func (NopMeterProvider) Meter ¶
func (NopMeterProvider) Meter(string, ...MeterOption) Meter
Meter returns a meter which creates no-op instruments.
type RecordMetricOption ¶
type RecordMetricOption func(o *RecordMetricOptions)
RecordMetricOption applies configuration to a recorded metric.
type RecordMetricOptions ¶
type RecordMetricOptions struct {
Properties smithy.Properties
}
RecordMetricOptions represents configuration for a recorded metric.