1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-06-27 00:21:15 +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

@ -18,7 +18,7 @@ import (
"context"
"testing"
"go.opentelemetry.io/otel/label"
"go.opentelemetry.io/otel/attribute"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
"go.opentelemetry.io/otel/trace"
)
@ -32,10 +32,10 @@ type testSpanProcessor struct {
func (t *testSpanProcessor) OnStart(parent context.Context, s sdktrace.ReadWriteSpan) {
psc := trace.RemoteSpanContextFromContext(parent)
kv := []label.KeyValue{
kv := []attribute.KeyValue{
{
Key: "SpanProcessorName",
Value: label.StringValue(t.name),
Value: attribute.StringValue(t.name),
},
// Store parent trace ID and span ID as attributes to be read later in
// tests so that we "do something" with the parent argument. Real
@ -43,11 +43,11 @@ func (t *testSpanProcessor) OnStart(parent context.Context, s sdktrace.ReadWrite
// a more meaningful way.
{
Key: "ParentTraceID",
Value: label.StringValue(psc.TraceID.String()),
Value: attribute.StringValue(psc.TraceID.String()),
},
{
Key: "ParentSpanID",
Value: label.StringValue(psc.SpanID.String()),
Value: attribute.StringValue(psc.SpanID.String()),
},
}
s.AddEvent("OnStart", trace.WithAttributes(kv...))