1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-25 22:41:46 +02:00

rename tag package to distributedContext (#178)

* rename package tag to package distributedContext

* rename Tag -> Entry

* change distributed context -> dctx to avoid capitalization collision

* change dctx -> distributedcontext

* update stackdriver client example
This commit is contained in:
Alyson van Hardenberg
2019-10-10 14:30:22 -07:00
committed by rghetia
parent f863bfbd86
commit 384b4bb86a
21 changed files with 126 additions and 126 deletions

View File

@@ -17,9 +17,9 @@ package main
import (
"context"
"go.opentelemetry.io/api/distributedcontext"
"go.opentelemetry.io/api/key"
"go.opentelemetry.io/api/metric"
"go.opentelemetry.io/api/tag"
"go.opentelemetry.io/api/trace"
"go.opentelemetry.io/experimental/streaming/exporter/spanlog"
@@ -47,9 +47,9 @@ var (
func main() {
ctx := context.Background()
ctx = tag.NewContext(ctx,
tag.Insert(fooKey.String("foo1")),
tag.Insert(barKey.String("bar1")),
ctx = distributedcontext.NewContext(ctx,
distributedcontext.Insert(fooKey.String("foo1")),
distributedcontext.Insert(barKey.String("bar1")),
)
commonLabels := meter.DefineLabels(ctx, lemonsKey.Int(10))
@@ -67,9 +67,9 @@ func main() {
gauge.Set(ctx, 1)
meter.RecordBatch(
// Note: call-site variables added as context tags:
tag.NewContext(ctx,
tag.Insert(anotherKey.String("xyz"))),
// Note: call-site variables added as context entries:
distributedcontext.NewContext(ctx,
distributedcontext.Insert(anotherKey.String("xyz"))),
commonLabels,
oneMetric.Measurement(1.0),