1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-07-13 01:00:22 +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

@ -26,7 +26,7 @@ import (
"github.com/stretchr/testify/require"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/label"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric"
export "go.opentelemetry.io/otel/sdk/export/metric"
"go.opentelemetry.io/otel/sdk/export/metric/aggregation"
@ -37,7 +37,7 @@ import (
"go.opentelemetry.io/otel/sdk/resource"
)
var testResource = resource.NewWithAttributes(label.String("R", "V"))
var testResource = resource.NewWithAttributes(attribute.String("R", "V"))
type handler struct {
sync.Mutex
@ -68,7 +68,7 @@ func init() {
func newExporter() *processortest.Exporter {
return processortest.NewExporter(
export.StatelessExportKindSelector(),
label.DefaultEncoder(),
attribute.DefaultEncoder(),
)
}
@ -76,7 +76,7 @@ func newCheckpointer() export.Checkpointer {
return processortest.Checkpointer(
processortest.NewProcessor(
processortest.AggregatorSelector(),
label.DefaultEncoder(),
attribute.DefaultEncoder(),
),
)
}
@ -205,7 +205,7 @@ func TestPushExportError(t *testing.T) {
require.NoError(t, p.Start(ctx))
runtime.Gosched()
counter1.Add(ctx, 3, label.String("X", "Y"))
counter1.Add(ctx, 3, attribute.String("X", "Y"))
counter2.Add(ctx, 5)
require.Equal(t, 0, exporter.ExportCount())