-
Notifications
You must be signed in to change notification settings - Fork 808
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
Implement xray-lambda propagator via the OTEL_PROPAGATORS env variable #4494
Comments
Why is it needed to move the propagators from contrib because of this? I don't think we should add a dependency to all optional components just to allow to configure them via environment/files. Users should have the ability to decide which components they install instead of forcing them to install everything. I wonder about the actual usecase to have xray, B3, W3C, ottrace (...) propagators installed at the same time everywhere and always. If users want a all propagators package we could create a meta package similar as for autoinstrumentations instead of hardwiring it into the SDK base (or node) package. |
The reason is that the mapping between the propagator name (e.g. "xray") and the package/class is hard-coded in the TracerProvider. In other words, the TracerProvider needs to know which class to require for the given name. In addition to that, my understanding is that core packages should not have a dependency on contrib packages. We discussed this in a SIG meeting, and moving these packages was the best solution we could come up with. Note that this really only applies to the propagators that are listed as supported by the OTEL_PROPAGATORS env variable in the spec.
Do you mean that the mapping between the name and the module is hard-coded in the TracerProvider. Or, can you please elaborate how this might work?
This is needed specifically for the lambda use case as described in the spec here. |
This hard coded dependency is problematic in my opinion. In special if is it in I know propagators are not that big. But I guess similar configs might come for other components like samplers, exporters (e.g see I think it would be better keep the actual propagator dependencies out of Higher layer packages (e.g. NodeSDK,... or some APM vendor bundles or an AWS Lambda monitoring layer) can hide this details and decide for the user to include more out of the box.
I don't think hardwiring xray propagator in Just to be clear, it's not about being against AWS/xray or any other vendor specific topics here. It's all about keeping the base small and flexible. A bit of topic: I would prefer to remove propagators like |
@Flarna In general, I agree with you. It would be better to not always distribute all these propagators. At the same time, the spec does list the known values for the OTEL_PROPAGATORS env variable, which itself is part of the SDK configuration. The The alternative is to not hardcode the mapping anywhere and instead introduce some API that users must call (as you mentioned). Maybe something like registerPropagator(name: string, propagator: TextMapPropagator); I am not opposed to this, but it introduces a new pattern, and I am curious what others think. /cc @pichlermarc @dyladan |
I think having it be part of I agree that we need to move it to this repo as it's listed as well known by the spec. If we want to conditionally require it from
I fully agree that it should not go into In my opinion we should remove the ability to hold exporters and propagators entirely from the Trace SDK package in 2.0 In short I think a well-known propagator should:
That being said, in the future we will need a way to better manage these things as the list of dependencies will just grow and grow from things that are added to the spec. I don't have a well thought-out way to do this - at the moment there are just too many things on my plate to come up with a solution for this, let alone drive the topic. 🙁 (A not very well though out solution: something like python's |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
The AWS lambda spec recently introduced a new xray-lambda propagator to support AWS Lambda's Active Tracing. This requires not only implementing the new propagator, but also making it possible to configure propagators and their order using the OTEL_PROPAGATORS env variable.
The env variable currently supports only the
tracecontext
andbaggage
propagators.The approach to make this work for 3rd-party propagators has been discussed in the SIG on 1/31/24, and it has been decided to move all propagators from contrib to the core repo and add them to the BasicTracerProvider lookup.In order to support all known propagators (includingxray
andxray-lambda
) in the OTEL_PROPAGATORS environment variable, we have introduced the auto-configuration-propagators package.Here is a list of tasks to implement this:
xray
to OTEL_PROPAGATORS env variable accepted values (feat(sdk-trace-node): support xray propagator #4602)addxray-lambda
to OTEL_PROPAGATORS env variable accepted values (feat(sdk-trace-node): add env mapping for xray-lambda propagator #4685)The text was updated successfully, but these errors were encountered: