kubernetes/vendor/go.opentelemetry.io/otel/metric/instrument.go

type Observable

type InstrumentOption

type HistogramOption

type descOpt

func (o descOpt) applyFloat64Counter(c Float64CounterConfig) Float64CounterConfig {}

func (o descOpt) applyFloat64UpDownCounter(c Float64UpDownCounterConfig) Float64UpDownCounterConfig {}

func (o descOpt) applyFloat64Histogram(c Float64HistogramConfig) Float64HistogramConfig {}

func (o descOpt) applyFloat64Gauge(c Float64GaugeConfig) Float64GaugeConfig {}

func (o descOpt) applyFloat64ObservableCounter(c Float64ObservableCounterConfig) Float64ObservableCounterConfig {}

func (o descOpt) applyFloat64ObservableUpDownCounter(c Float64ObservableUpDownCounterConfig) Float64ObservableUpDownCounterConfig {}

func (o descOpt) applyFloat64ObservableGauge(c Float64ObservableGaugeConfig) Float64ObservableGaugeConfig {}

func (o descOpt) applyInt64Counter(c Int64CounterConfig) Int64CounterConfig {}

func (o descOpt) applyInt64UpDownCounter(c Int64UpDownCounterConfig) Int64UpDownCounterConfig {}

func (o descOpt) applyInt64Histogram(c Int64HistogramConfig) Int64HistogramConfig {}

func (o descOpt) applyInt64Gauge(c Int64GaugeConfig) Int64GaugeConfig {}

func (o descOpt) applyInt64ObservableCounter(c Int64ObservableCounterConfig) Int64ObservableCounterConfig {}

func (o descOpt) applyInt64ObservableUpDownCounter(c Int64ObservableUpDownCounterConfig) Int64ObservableUpDownCounterConfig {}

func (o descOpt) applyInt64ObservableGauge(c Int64ObservableGaugeConfig) Int64ObservableGaugeConfig {}

// WithDescription sets the instrument description.
func WithDescription(desc string) InstrumentOption {}

type unitOpt

func (o unitOpt) applyFloat64Counter(c Float64CounterConfig) Float64CounterConfig {}

func (o unitOpt) applyFloat64UpDownCounter(c Float64UpDownCounterConfig) Float64UpDownCounterConfig {}

func (o unitOpt) applyFloat64Histogram(c Float64HistogramConfig) Float64HistogramConfig {}

func (o unitOpt) applyFloat64Gauge(c Float64GaugeConfig) Float64GaugeConfig {}

func (o unitOpt) applyFloat64ObservableCounter(c Float64ObservableCounterConfig) Float64ObservableCounterConfig {}

func (o unitOpt) applyFloat64ObservableUpDownCounter(c Float64ObservableUpDownCounterConfig) Float64ObservableUpDownCounterConfig {}

func (o unitOpt) applyFloat64ObservableGauge(c Float64ObservableGaugeConfig) Float64ObservableGaugeConfig {}

func (o unitOpt) applyInt64Counter(c Int64CounterConfig) Int64CounterConfig {}

func (o unitOpt) applyInt64UpDownCounter(c Int64UpDownCounterConfig) Int64UpDownCounterConfig {}

func (o unitOpt) applyInt64Histogram(c Int64HistogramConfig) Int64HistogramConfig {}

func (o unitOpt) applyInt64Gauge(c Int64GaugeConfig) Int64GaugeConfig {}

func (o unitOpt) applyInt64ObservableCounter(c Int64ObservableCounterConfig) Int64ObservableCounterConfig {}

func (o unitOpt) applyInt64ObservableUpDownCounter(c Int64ObservableUpDownCounterConfig) Int64ObservableUpDownCounterConfig {}

func (o unitOpt) applyInt64ObservableGauge(c Int64ObservableGaugeConfig) Int64ObservableGaugeConfig {}

// WithUnit sets the instrument unit.
//
// The unit u should be defined using the appropriate [UCUM](https://ucum.org) case-sensitive code.
func WithUnit(u string) InstrumentOption {}

// WithExplicitBucketBoundaries sets the instrument explicit bucket boundaries.
//
// This option is considered "advisory", and may be ignored by API implementations.
func WithExplicitBucketBoundaries(bounds ...float64) HistogramOption {}

type bucketOpt

func (o bucketOpt) applyFloat64Histogram(c Float64HistogramConfig) Float64HistogramConfig {}

func (o bucketOpt) applyInt64Histogram(c Int64HistogramConfig) Int64HistogramConfig {}

type AddOption

type AddConfig

// NewAddConfig returns a new [AddConfig] with all opts applied.
func NewAddConfig(opts []AddOption) AddConfig {}

// Attributes returns the configured attribute set.
func (c AddConfig) Attributes() attribute.Set {}

type RecordOption

type RecordConfig

// NewRecordConfig returns a new [RecordConfig] with all opts applied.
func NewRecordConfig(opts []RecordOption) RecordConfig {}

// Attributes returns the configured attribute set.
func (c RecordConfig) Attributes() attribute.Set {}

type ObserveOption

type ObserveConfig

// NewObserveConfig returns a new [ObserveConfig] with all opts applied.
func NewObserveConfig(opts []ObserveOption) ObserveConfig {}

// Attributes returns the configured attribute set.
func (c ObserveConfig) Attributes() attribute.Set {}

type MeasurementOption

type attrOpt

// mergeSets returns the union of keys between a and b. Any duplicate keys will
// use the value associated with b.
func mergeSets(a, b attribute.Set) attribute.Set {}

func (o attrOpt) applyAdd(c AddConfig) AddConfig {}

func (o attrOpt) applyRecord(c RecordConfig) RecordConfig {}

func (o attrOpt) applyObserve(c ObserveConfig) ObserveConfig {}

// WithAttributeSet sets the attribute Set associated with a measurement is
// made with.
//
// If multiple WithAttributeSet or WithAttributes options are passed the
// attributes will be merged together in the order they are passed. Attributes
// with duplicate keys will use the last value passed.
func WithAttributeSet(attributes attribute.Set) MeasurementOption {}

// WithAttributes converts attributes into an attribute Set and sets the Set to
// be associated with a measurement. This is shorthand for:
//
//	cp := make([]attribute.KeyValue, len(attributes))
//	copy(cp, attributes)
//	WithAttributes(attribute.NewSet(cp...))
//
// [attribute.NewSet] may modify the passed attributes so this will make a copy
// of attributes before creating a set in order to ensure this function is
// concurrent safe. This makes this option function less optimized in
// comparison to [WithAttributeSet]. Therefore, [WithAttributeSet] should be
// preferred for performance sensitive code.
//
// See [WithAttributeSet] for information about how multiple WithAttributes are
// merged.
func WithAttributes(attributes ...attribute.KeyValue) MeasurementOption {}