1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-29 23:07:45 +02:00

Rename otel/label -> otel/attribute (#1541)

* Rename otel/label -> otel/attr

Leave the imported name alone, to avoid a large diff and conflicts

* Better import comment

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* otel/attr -> otel/attribute

* Missed the changelog entry

* Get rid of import renaming

* Merge remaining conflicts

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
This commit is contained in:
Punya Biswal
2021-02-18 12:59:37 -05:00
committed by GitHub
parent 1b5b662136
commit ecf65d7968
123 changed files with 1715 additions and 1715 deletions

View File

@@ -21,8 +21,8 @@ import (
"github.com/stretchr/testify/require"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/internal/global"
"go.opentelemetry.io/otel/label"
"go.opentelemetry.io/otel/metric"
metricglobal "go.opentelemetry.io/otel/metric/global"
"go.opentelemetry.io/otel/metric/number"
@@ -40,9 +40,9 @@ func TestDirect(t *testing.T) {
ctx := context.Background()
meter1 := metricglobal.Meter("test1", metric.WithInstrumentationVersion("semver:v1.0.0"))
meter2 := metricglobal.Meter("test2")
labels1 := []label.KeyValue{label.String("A", "B")}
labels2 := []label.KeyValue{label.String("C", "D")}
labels3 := []label.KeyValue{label.String("E", "F")}
labels1 := []attribute.KeyValue{attribute.String("A", "B")}
labels2 := []attribute.KeyValue{attribute.String("C", "D")}
labels3 := []attribute.KeyValue{attribute.String("E", "F")}
counter := Must(meter1).NewInt64Counter("test.counter")
counter.Add(ctx, 1, labels1...)
@@ -139,7 +139,7 @@ func TestBound(t *testing.T) {
// vs. the above, to cover all the instruments.
ctx := context.Background()
glob := metricglobal.Meter("test")
labels1 := []label.KeyValue{label.String("A", "B")}
labels1 := []attribute.KeyValue{attribute.String("A", "B")}
counter := Must(glob).NewFloat64Counter("test.counter")
boundC := counter.Bind(labels1...)
@@ -183,7 +183,7 @@ func TestUnbind(t *testing.T) {
global.ResetForTest()
glob := metricglobal.Meter("test")
labels1 := []label.KeyValue{label.String("A", "B")}
labels1 := []attribute.KeyValue{attribute.String("A", "B")}
counter := Must(glob).NewFloat64Counter("test.counter")
boundC := counter.Bind(labels1...)