Skip to content

OTEL_RESOURCE_ATTRIBUTES values are not parsed as defined per spec #3395

@pellared

Description

@pellared

From the OTel spec:

The OTEL_RESOURCE_ATTRIBUTES environment variable will contain of a list of key value pairs, and these are expected to be represented in a format matching to the W3C Baggage, except that additional semi-colon delimited metadata is not supported, i.e.: key1=value1,key2=value2. All attribute values MUST be considered strings.

From the W3C spec:

A value contains a URL encoded UTF-8 string. Leading and trailing whitespaces (OWS) are allowed but MUST be trimmed when converting the header into a data structure.

Currently, the values defined in OTEL_RESOURCE_ATTRIBUTES (splitted by ,) are not parsed at all. Source code here.

Found thanks to: open-telemetry/opentelemetry-go#2963

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedGood for taking. Extra help will be provided by maintainerspkg:OpenTelemetryIssues related to OpenTelemetry NuGet package

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions