Skip to content

ParentContextExtractor should read tracing info from system property #7579

Closed
@smirnoal

Description

@smirnoal

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: link

Describe 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions