Skip to content

Way to add baggage as tags via environment variable OR system properties #4975

Description

@umarkhan17

Is there a way to map baggage as tags via environment variable OR system properties? I know that it can be done via span.getBaggageItem and span.setBaggageItem, but is there a service level or global property which can be set like DD_TRACE_BAGGAGE_TAGS, which will accept baggage-key:span-key where it will check if a span has the baggageItem called baggage-key and create a span tag with that baggage item.

Why i would want this is, because we have a key called as taskId which gets generated early on for a task run, and i want all the spans searchable by that taskId, meaning i want taskId available throughout the trace. I know that i can add baggageItem, but baggageItems are not sent to datadog. Also, doing getBaggageItem everywhere in the code is cumbersome process.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions