1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-29 23:07:45 +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

@@ -20,7 +20,7 @@ import (
"net/http"
"os"
"go.opentelemetry.io/api/tag"
"go.opentelemetry.io/api/distributedcontext"
"go.opentelemetry.io/api/trace"
"go.opentelemetry.io/exporter/trace/stackdriver"
"go.opentelemetry.io/plugin/httptrace"
@@ -53,10 +53,10 @@ func main() {
initTracer()
helloHandler := func(w http.ResponseWriter, req *http.Request) {
attrs, tags, spanCtx := httptrace.Extract(req.Context(), req)
attrs, entries, spanCtx := httptrace.Extract(req.Context(), req)
req = req.WithContext(tag.WithMap(req.Context(), tag.NewMap(tag.MapUpdate{
MultiKV: tags,
req = req.WithContext(distributedcontext.WithMap(req.Context(), distributedcontext.NewMap(distributedcontext.MapUpdate{
MultiKV: entries,
})))
ctx, span := trace.GlobalTracer().Start(