Skip to content

Instantly share code, notes, and snippets.

@yurishkuro
Last active February 8, 2023 23:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yurishkuro/2b9b1e5f6baec34c21c66af0fc867a73 to your computer and use it in GitHub Desktop.
Save yurishkuro/2b9b1e5f6baec34c21c66af0fc867a73 to your computer and use it in GitHub Desktop.
HotROD OTEL propagator
var once sync.Once
// Init initializes OpenTelemetry SDK and uses OTel-OpenTracing Bridge
// to return an OpenTracing-compatible tracer.
func Init(serviceName string, exporterType string, ...) opentracing.Tracer {
once.Do(func() {
propagation.NewCompositeTextMapPropagator(
propagation.TraceContext{},
propagation.Baggage{},
))
})
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment