Skip to content

Commit

Permalink
Merge branch 'master' into 1341-tracestate-in-samplingresult
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlias authored Jan 6, 2021
2 parents b332d2a + db06c8d commit cb6c980
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions example/otel-collector/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,12 @@ func initProvider() func() {
pusher.Start()

return func() {
handleErr(tracerProvider.Shutdown(ctx), "failed to shutdown provider")
// Shutdown will flush any remaining spans.
handleErr(tracerProvider.Shutdown(ctx), "failed to shutdown TracerProvider")

// Push any last metric events to the exporter.
pusher.Stop()
handleErr(exp.Shutdown(ctx), "failed to stop exporter")
pusher.Stop() // pushes any last exports to the receiver
}
}

Expand Down
2 changes: 1 addition & 1 deletion trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func Tracer(name string) trace.Tracer {
return GetTracerProvider().Tracer(name)
}

// TracerProvider returns the registered global trace provider.
// GetTracerProvider returns the registered global trace provider.
// If none is registered then an instance of NoopTracerProvider is returned.
//
// Use the trace provider to create a named tracer. E.g.
Expand Down

0 comments on commit cb6c980

Please sign in to comment.