Open pbrisbin opened 1 year ago
As far as I can see https://github.com/iand675/hs-opentelemetry/blob/54251bd15565e3a07cda0cecfa544d209ae63df6/sdk/src/OpenTelemetry/Trace.hs#L298-L299
and
mean that only those propagators already known to the SDK are automatically used based on environment variables. Unfortunately, awsxray is not one of them:
This TODO seems apropos and I'm sure @iand675 would be glad for a PR that implements this:
We're also wondering about this. There's also the issue that tracerProviderPropagators
is specialised to HTTP headers, which isn't necessarily appropriate in all cases. For example, we have a Propagator
for AMQP messages. At the moment we're just manually invoking it around the use sites of the library, but presumably the idea is that somehow we will eventually be able to register propagators that process different message types?
:wave: Hi there!
We're just getting started with OpenTelemetry and are looking to emit OTel traces from our app and then us the AWS collector to export to X-Ray. This means we need an AWS X-Ray
Propagator
,IdGenerator
, andSampler
. I've written some of this code and it's working (I think), but it's been awkward (IMO) to get the SDK to use it.I had to basically re-implement
initializeGlobalTracerProvider
just so that I could inject a record update to add my propagator after all the environment-variable-based configuration has happened. But then I look at the docs for said environment variables, and it seems like I should be able to "register" these things somehow, and then just say (e.g.)OTEL_PROPAGATORS=tracecontext,baggage,awsxray
at runtime to turn them on. That would be really useful as we start migrating from X-Ray to Datadog -- to be able to choose via ENV at runtime like that.So I guess my question is, am I missing a way in this library to do that?