1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-02 08:52:21 +02:00

Remove references in godoc comments to WithKeys (#672)

* Remove references in godoc comments to WithKeys

WithKeys was removed in PR#639

* Apply suggestions from code review

Fix copy pasta

Co-Authored-By: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
This commit is contained in:
ET 2020-04-28 12:29:48 -07:00 committed by GitHub
parent 5863f8562b
commit 3809f7bba3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 56 deletions

View File

@ -44,25 +44,15 @@ type BoundInt64Counter struct {
syncBoundInstrument
}
// Bind creates a bound instrument for this counter. The labels should
// contain the keys and values for each key specified in the counter
// with the WithKeys option.
//
// If the labels do not contain a value for the key specified in the
// counter with the WithKeys option, then the missing value will be
// treated as unspecified.
// Bind creates a bound instrument for this counter. The labels are
// associated with values recorded via subsequent calls to Record.
func (c Float64Counter) Bind(labels ...core.KeyValue) (h BoundFloat64Counter) {
h.syncBoundInstrument = c.bind(labels)
return
}
// Bind creates a bound instrument for this counter. The labels should
// contain the keys and values for each key specified in the counter
// with the WithKeys option.
//
// If the labels do not contain a value for the key specified in the
// counter with the WithKeys option, then the missing value will be
// treated as unspecified.
// Bind creates a bound instrument for this counter. The labels are
// associated with values recorded via subsequent calls to Record.
func (c Int64Counter) Bind(labels ...core.KeyValue) (h BoundInt64Counter) {
h.syncBoundInstrument = c.bind(labels)
return
@ -81,33 +71,25 @@ func (c Int64Counter) Measurement(value int64) Measurement {
}
// Add adds the value to the counter's sum. The labels should contain
// the keys and values for each key specified in the counter with the
// WithKeys option.
//
// If the labels do not contain a value for the key specified in the
// counter with the WithKeys option, then the missing value will be
// treated as unspecified.
// the keys and values to be associated with this value.
func (c Float64Counter) Add(ctx context.Context, value float64, labels ...core.KeyValue) {
c.directRecord(ctx, core.NewFloat64Number(value), labels)
}
// Add adds the value to the counter's sum. The labels should contain
// the keys and values for each key specified in the counter with the
// WithKeys option.
//
// If the labels do not contain a value for the key specified in the
// counter with the WithKeys option, then the missing value will be
// treated as unspecified.
// the keys and values to be associated with this value.
func (c Int64Counter) Add(ctx context.Context, value int64, labels ...core.KeyValue) {
c.directRecord(ctx, core.NewInt64Number(value), labels)
}
// Add adds the value to the counter's sum.
// Add adds the value to the counter's sum using the labels
// previously bound to this counter via Bind()
func (b BoundFloat64Counter) Add(ctx context.Context, value float64) {
b.directRecord(ctx, core.NewFloat64Number(value))
}
// Add adds the value to the counter's sum.
// Add adds the value to the counter's sum using the labels
// previously bound to this counter via Bind()
func (b BoundInt64Counter) Add(ctx context.Context, value int64) {
b.directRecord(ctx, core.NewInt64Number(value))
}

View File

@ -44,25 +44,15 @@ type BoundInt64Measure struct {
syncBoundInstrument
}
// Bind creates a bound instrument for this measure. The labels should
// contain the keys and values for each key specified in the measure
// with the WithKeys option.
//
// If the labels do not contain a value for the key specified in the
// measure with the WithKeys option, then the missing value will be
// treated as unspecified.
// Bind creates a bound instrument for this measure. The labels are
// associated with values recorded via subsequent calls to Record.
func (c Float64Measure) Bind(labels ...core.KeyValue) (h BoundFloat64Measure) {
h.syncBoundInstrument = c.bind(labels)
return
}
// Bind creates a bound instrument for this measure. The labels should
// contain the keys and values for each key specified in the measure
// with the WithKeys option.
//
// If the labels do not contain a value for the key specified in the
// measure with the WithKeys option, then the missing value will be
// treated as unspecified.
// Bind creates a bound instrument for this measure. The labels are
// associated with values recorded via subsequent calls to Record.
func (c Int64Measure) Bind(labels ...core.KeyValue) (h BoundInt64Measure) {
h.syncBoundInstrument = c.bind(labels)
return
@ -81,33 +71,27 @@ func (c Int64Measure) Measurement(value int64) Measurement {
}
// Record adds a new value to the list of measure's records. The
// labels should contain the keys and values for each key specified in
// the measure with the WithKeys option.
//
// If the labels do not contain a value for the key specified in the
// measure with the WithKeys option, then the missing value will be
// treated as unspecified.
// labels should contain the keys and values to be associated with
// this value.
func (c Float64Measure) Record(ctx context.Context, value float64, labels ...core.KeyValue) {
c.directRecord(ctx, core.NewFloat64Number(value), labels)
}
// Record adds a new value to the list of measure's records. The
// labels should contain the keys and values for each key specified in
// the measure with the WithKeys option.
//
// If the labels do not contain a value for the key specified in the
// measure with the WithKeys option, then the missing value will be
// treated as unspecified.
// labels should contain the keys and values to be associated with
// this value.
func (c Int64Measure) Record(ctx context.Context, value int64, labels ...core.KeyValue) {
c.directRecord(ctx, core.NewInt64Number(value), labels)
}
// Record adds a new value to the list of measure's records.
// Record adds a new value to the list of measure's records using the labels
// previously bound to the measure via Bind()
func (b BoundFloat64Measure) Record(ctx context.Context, value float64) {
b.directRecord(ctx, core.NewFloat64Number(value))
}
// Record adds a new value to the list of measure's records.
// Record adds a new value to the list of measure's records using the labels
// previously bound to the measure via Bind()
func (b BoundInt64Measure) Record(ctx context.Context, value int64) {
b.directRecord(ctx, core.NewInt64Number(value))
}