Skip to content

Optimize envar trace context access #2

@jdcasey

Description

@jdcasey

See: https://github.com/release-engineering/opentelemetry-ext-cli-java/blob/main/src/main/java/com/redhat/resilience/otel/internal/EnvarExtractingPropagator.java#L134

Trace context is pulled from System.getenv() constantly, which is inefficient. It would be better to store that in memory the first time it's read, and simply return that field value for subsequent calls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions