mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-01-28 03:57:09 +02:00
Document how to pass attributes for all record methods (#4058)
* Document how to pass attributes for all record methods * Update based on feedback
This commit is contained in:
parent
6f045478c9
commit
02c0001307
@ -217,7 +217,10 @@ type Float64Observer interface {
|
||||
embedded.Float64Observer
|
||||
|
||||
// Observe records the float64 value.
|
||||
Observe(value float64, opts ...ObserveOption)
|
||||
//
|
||||
// Use the WithAttributeSet (or, if performance is not a concern,
|
||||
// the WithAttributes) option to include measurement attributes.
|
||||
Observe(value float64, options ...ObserveOption)
|
||||
}
|
||||
|
||||
// Float64Callback is a function registered with a Meter that makes
|
||||
|
@ -216,7 +216,10 @@ type Int64Observer interface {
|
||||
embedded.Int64Observer
|
||||
|
||||
// Observe records the int64 value.
|
||||
Observe(value int64, opts ...ObserveOption)
|
||||
//
|
||||
// Use the WithAttributeSet (or, if performance is not a concern,
|
||||
// the WithAttributes) option to include measurement attributes.
|
||||
Observe(value int64, options ...ObserveOption)
|
||||
}
|
||||
|
||||
// Int64Callback is a function registered with a Meter that makes observations
|
||||
|
@ -32,7 +32,10 @@ type Float64Counter interface {
|
||||
embedded.Float64Counter
|
||||
|
||||
// Add records a change to the counter.
|
||||
Add(ctx context.Context, incr float64, opts ...AddOption)
|
||||
//
|
||||
// Use the WithAttributeSet (or, if performance is not a concern,
|
||||
// the WithAttributes) option to include measurement attributes.
|
||||
Add(ctx context.Context, incr float64, options ...AddOption)
|
||||
}
|
||||
|
||||
// Float64CounterConfig contains options for synchronous counter instruments that
|
||||
@ -82,7 +85,10 @@ type Float64UpDownCounter interface {
|
||||
embedded.Float64UpDownCounter
|
||||
|
||||
// Add records a change to the counter.
|
||||
Add(ctx context.Context, incr float64, opts ...AddOption)
|
||||
//
|
||||
// Use the WithAttributeSet (or, if performance is not a concern,
|
||||
// the WithAttributes) option to include measurement attributes.
|
||||
Add(ctx context.Context, incr float64, options ...AddOption)
|
||||
}
|
||||
|
||||
// Float64UpDownCounterConfig contains options for synchronous counter
|
||||
@ -132,7 +138,10 @@ type Float64Histogram interface {
|
||||
embedded.Float64Histogram
|
||||
|
||||
// Record adds an additional value to the distribution.
|
||||
Record(ctx context.Context, incr float64, opts ...RecordOption)
|
||||
//
|
||||
// Use the WithAttributeSet (or, if performance is not a concern,
|
||||
// the WithAttributes) option to include measurement attributes.
|
||||
Record(ctx context.Context, incr float64, options ...RecordOption)
|
||||
}
|
||||
|
||||
// Float64HistogramConfig contains options for synchronous counter instruments
|
||||
|
@ -32,7 +32,10 @@ type Int64Counter interface {
|
||||
embedded.Int64Counter
|
||||
|
||||
// Add records a change to the counter.
|
||||
Add(ctx context.Context, incr int64, opts ...AddOption)
|
||||
//
|
||||
// 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
|
||||
@ -82,7 +85,10 @@ type Int64UpDownCounter interface {
|
||||
embedded.Int64UpDownCounter
|
||||
|
||||
// Add records a change to the counter.
|
||||
Add(ctx context.Context, incr int64, opts ...AddOption)
|
||||
//
|
||||
// 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
|
||||
@ -132,7 +138,10 @@ type Int64Histogram interface {
|
||||
embedded.Int64Histogram
|
||||
|
||||
// Record adds an additional value to the distribution.
|
||||
Record(ctx context.Context, incr int64, opts ...RecordOption)
|
||||
//
|
||||
// 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 counter instruments
|
||||
|
Loading…
x
Reference in New Issue
Block a user