Source File
syncint64.go
Belonging Package
go.opentelemetry.io/otel/metric
// Copyright The OpenTelemetry Authors// SPDX-License-Identifier: Apache-2.0package metric // import "go.opentelemetry.io/otel/metric"import ()// Int64Counter is an instrument that records increasing int64 values.//// Warning: Methods may be added to this interface in minor releases. See// package documentation on API implementation for information on how to set// default behavior for unimplemented methods.type Int64Counter interface {// Users of the interface can ignore this. This embedded type is only used// by implementations of this interface. See the "API Implementations"// section of the package documentation for more information.embedded.Int64Counter// Add records a change to the counter.//// Use the WithAttributeSet (or, if performance is not a concern,// the WithAttributes) option to include measurement attributes.Add(ctx context.Context, incr int64, options ...AddOption)}// Int64CounterConfig contains options for synchronous counter instruments that// record int64 values.type Int64CounterConfig struct {description stringunit string}// NewInt64CounterConfig returns a new [Int64CounterConfig] with all opts// applied.func ( ...Int64CounterOption) Int64CounterConfig {var Int64CounterConfigfor , := range {= .applyInt64Counter()}return}// Description returns the configured description.func ( Int64CounterConfig) () string {return .description}// Unit returns the configured unit.func ( Int64CounterConfig) () string {return .unit}// Int64CounterOption applies options to a [Int64CounterConfig]. See// [InstrumentOption] for other options that can be used as an// Int64CounterOption.type Int64CounterOption interface {applyInt64Counter(Int64CounterConfig) Int64CounterConfig}// Int64UpDownCounter is an instrument that records increasing or decreasing// int64 values.//// Warning: Methods may be added to this interface in minor releases. See// package documentation on API implementation for information on how to set// default behavior for unimplemented methods.type Int64UpDownCounter interface {// Users of the interface can ignore this. This embedded type is only used// by implementations of this interface. See the "API Implementations"// section of the package documentation for more information.embedded.Int64UpDownCounter// Add records a change to the counter.//// Use the WithAttributeSet (or, if performance is not a concern,// the WithAttributes) option to include measurement attributes.Add(ctx context.Context, incr int64, options ...AddOption)}// Int64UpDownCounterConfig contains options for synchronous counter// instruments that record int64 values.type Int64UpDownCounterConfig struct {description stringunit string}// NewInt64UpDownCounterConfig returns a new [Int64UpDownCounterConfig] with// all opts applied.func ( ...Int64UpDownCounterOption) Int64UpDownCounterConfig {var Int64UpDownCounterConfigfor , := range {= .applyInt64UpDownCounter()}return}// Description returns the configured description.func ( Int64UpDownCounterConfig) () string {return .description}// Unit returns the configured unit.func ( Int64UpDownCounterConfig) () string {return .unit}// Int64UpDownCounterOption applies options to a [Int64UpDownCounterConfig].// See [InstrumentOption] for other options that can be used as an// Int64UpDownCounterOption.type Int64UpDownCounterOption interface {applyInt64UpDownCounter(Int64UpDownCounterConfig) Int64UpDownCounterConfig}// Int64Histogram is an instrument that records a distribution of int64// values.//// Warning: Methods may be added to this interface in minor releases. See// package documentation on API implementation for information on how to set// default behavior for unimplemented methods.type Int64Histogram interface {// Users of the interface can ignore this. This embedded type is only used// by implementations of this interface. See the "API Implementations"// section of the package documentation for more information.embedded.Int64Histogram// Record adds an additional value to the distribution.//// Use the WithAttributeSet (or, if performance is not a concern,// the WithAttributes) option to include measurement attributes.Record(ctx context.Context, incr int64, options ...RecordOption)}// Int64HistogramConfig contains options for synchronous histogram instruments// that record int64 values.type Int64HistogramConfig struct {description stringunit stringexplicitBucketBoundaries []float64}// NewInt64HistogramConfig returns a new [Int64HistogramConfig] with all opts// applied.func ( ...Int64HistogramOption) Int64HistogramConfig {var Int64HistogramConfigfor , := range {= .applyInt64Histogram()}return}// Description returns the configured description.func ( Int64HistogramConfig) () string {return .description}// Unit returns the configured unit.func ( Int64HistogramConfig) () string {return .unit}// ExplicitBucketBoundaries returns the configured explicit bucket boundaries.func ( Int64HistogramConfig) () []float64 {return .explicitBucketBoundaries}// Int64HistogramOption applies options to a [Int64HistogramConfig]. See// [InstrumentOption] for other options that can be used as an// Int64HistogramOption.type Int64HistogramOption interface {applyInt64Histogram(Int64HistogramConfig) Int64HistogramConfig}// Int64Gauge is an instrument that records instantaneous int64 values.//// Warning: Methods may be added to this interface in minor releases. See// package documentation on API implementation for information on how to set// default behavior for unimplemented methods.type Int64Gauge interface {// Users of the interface can ignore this. This embedded type is only used// by implementations of this interface. See the "API Implementations"// section of the package documentation for more information.embedded.Int64Gauge// Record records the instantaneous value.//// Use the WithAttributeSet (or, if performance is not a concern,// the WithAttributes) option to include measurement attributes.Record(ctx context.Context, value int64, options ...RecordOption)}// Int64GaugeConfig contains options for synchronous gauge instruments that// record int64 values.type Int64GaugeConfig struct {description stringunit string}// NewInt64GaugeConfig returns a new [Int64GaugeConfig] with all opts// applied.func ( ...Int64GaugeOption) Int64GaugeConfig {var Int64GaugeConfigfor , := range {= .applyInt64Gauge()}return}// Description returns the configured description.func ( Int64GaugeConfig) () string {return .description}// Unit returns the configured unit.func ( Int64GaugeConfig) () string {return .unit}// Int64GaugeOption applies options to a [Int64GaugeConfig]. See// [InstrumentOption] for other options that can be used as a// Int64GaugeOption.type Int64GaugeOption interface {applyInt64Gauge(Int64GaugeConfig) Int64GaugeConfig}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |