Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Add codec based on env var JAEGER_PROPAGATION #277

Closed
jpkrohling opened this issue Mar 28, 2018 · 1 comment
Closed

Add codec based on env var JAEGER_PROPAGATION #277

jpkrohling opened this issue Mar 28, 2018 · 1 comment

Comments

@jpkrohling
Copy link
Contributor

The Java client has a feature where codecs can be specified via the env var JAEGER_PROPAGATION. Here's its description:

Comma separated list of formats to use for propagating the trace context. Defaults to the standard Jaeger format. Valid values are jaeger and b3

This issue is to bring the feature to the Go client. Currently, only jaeger is automatically set. The following code can be used to add the Zipkin to the tracer options:

	zipkinPropagator := zipkin.NewZipkinB3HTTPHeaderPropagator()
	injector := jaeger.TracerOptions.Injector(opentracing.HTTPHeaders, zipkinPropagator)
	extractor := jaeger.TracerOptions.Extractor(opentracing.HTTPHeaders, zipkinPropagator)

And here's the relevant code in the Java client:

https://github.com/jaegertracing/jaeger-client-java/blob/master/jaeger-core/src/main/java/com/uber/jaeger/Configuration.java#L437-L462

@yurishkuro
Copy link
Member

the big downside in Go if we support this feature is that the config module starts to depend on all other modules, whether the end user needs them or not. I think it is an anti-pattern in Go.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants