Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SpanProcessor Shutdown with context and error #1264

Merged
merged 11 commits into from
Oct 27, 2020
3 changes: 1 addition & 2 deletions example/basic/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ func main() {
log.Fatalf("failed to initialize stdout export pipeline: %v", err)
}

ctx := context.Background()

bsp := sdktrace.NewBatchSpanProcessor(exporter)
tp := sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(bsp))
defer func() { _ = tp.Shutdown(context.Background()) }()
Expand Down Expand Up @@ -78,6 +76,7 @@ func main() {

valuerecorderTwo := otel.Must(meter).NewFloat64ValueRecorder("ex.com.two")

ctx := context.Background()
MrAlias marked this conversation as resolved.
Show resolved Hide resolved
ctx = otel.ContextWithBaggageValues(ctx, fooKey.String("foo1"), barKey.String("bar1"))

valuerecorder := valuerecorderTwo.Bind(commonLabels...)
Expand Down