-
Notifications
You must be signed in to change notification settings - Fork 895
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
ParentContextExtractor should read tracing info from system property #7579
Comments
it looks like that issue is still open? |
and still actual. Would be great if someone can pick it up. Looks pretty straightforward to implement |
copying folks who may have knowledge/thoughts/interest: @willarmiros @tylerbenson @open-telemetry/lambda-extension-approvers |
Note that in #7970, the span context in this env var becomes a span link instead of the parent. I have no objection to reading from both locations for populating the span link. I think the main question I have is can this be included in the relevant spec somehow? When I updated that section earlier this year, I didn't understand or expect that the environment variable was updated for each request as that's not something normal applications do. I think it's worth adding or linking to some documentation about this environment variable's purpose and odd behavior. I haven't found any docs on it. @smirnoal is this something you (or someone else at AWS) would be interested in working on? |
I believe with the PRs merged, this issue can be closed. Would be good to know which release will contain the fix |
That will be release 1.27.0, which should happen in ~2 weeks. |
Is your feature request related to a problem? Please describe.
Java does not have a good mechanism for modifying environment variables. There are some hacky solutions which use Reflection API, and modify the UnmodifiableMap which holds the variables. This technique is now discouraged by Oracle. Good reads on this topic: blog post by Oracle
Because of this, setting tracing information via
_X_AMZN_TRACE_ID
is challenging in new versions of Java, even with the hack.Would it be possible to implement reading tracing information from a system property, not from an environment variable?
aws-x-ray-sdk-java
implemented this some time ago: linkDescribe the solution you'd like
Optionally read tracing information from
com.amazonaws.xray.traceHeader
system property.Similarly to this PR: https://github.com/aws/aws-xray-sdk-java/pull/252/files
Additional context
Perhaps, this class should be modified: link
The text was updated successfully, but these errors were encountered: