Skip to content
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

OTEL_RESOURCE_ATTRIBUTES values are not parsed as defined per spec #3395

Open
pellared opened this issue Jun 21, 2022 · 10 comments
Open

OTEL_RESOURCE_ATTRIBUTES values are not parsed as defined per spec #3395

pellared opened this issue Jun 21, 2022 · 10 comments
Labels
bug Something isn't working help wanted Good for taking. Extra help will be provided by maintainers pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package
Milestone

Comments

@pellared
Copy link
Member

pellared commented Jun 21, 2022

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

@pellared pellared added bug Something isn't working pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package labels Jun 21, 2022
@lgfa29
Copy link

lgfa29 commented Jul 31, 2022

open-telemetry/opentelemetry-specification#2670 updates the Resource spec to take percent-decode into account.

@martinjt
Copy link
Member

Is this still the case @pellared ?

@pellared
Copy link
Member Author

The OTEL_RESOURCE_ATTRIBUTES env var is still still not properly parsed.

It accepts keys that should not be allowed.

They values are not precent decoded as noted #3395 (comment)

Reference: https://www.w3.org/TR/baggage/#definition

Copy link
Contributor

This issue was marked stale due to lack of activity and will be closed in 7 days. Commenting will instruct the bot to automatically remove the label. This bot runs once per day.

@github-actions github-actions bot added the Stale Issues and pull requests which have been flagged for closing due to inactivity label Dec 19, 2024
Copy link
Contributor

Closed as inactive. Feel free to reopen if this issue is still a concern.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 27, 2024
@pellared
Copy link
Member Author

@open-telemetry/dotnet-maintainers, I am not sure if auto-closing confirmed issues is a good idea.

@Kielek Kielek reopened this Jan 20, 2025
@Kielek Kielek added this to the Future milestone Jan 20, 2025
@Kielek Kielek removed the Stale Issues and pull requests which have been flagged for closing due to inactivity label Jan 20, 2025
@martinjt
Copy link
Member

It's pretty common to close stale issues, if we don't plan on fixing this, then I don't see a point in leaving it open personally.

@pellared
Copy link
Member Author

It's pretty common to close stale issues,

There is a difference between an issue when someone is not responsive (and the issue cannot be moved further) from an issue where there was nobody who had to time to fix it.

if we don't plan on fixing this,

Why do you not plan fixing this? Is there any reason why it cannot be fixed?

I don't see a point in leaving it open personally.

Maybe this could have "help wanted" and "good first issue" labels?

@TimothyMothra
Copy link
Contributor

Hi @pellared, I'm sorry this issue got closed.
Your issue was identified as stale on Dec 18, and then closed on Dec 26.
Nothing personal, it's just a coincidence that everyone was on Christmas break during this period and THIS issue slipped through.

We added the stale automation last year because we had hundreds of abandoned issues and we needed a systematic way of combing through these and identifying what to keep open.

You reported that .NET isn't following the spec regarding OTEL_RESOURCE_ATTRIBUTES. I think this should be kept open. I see that Kielek already added this to the Future milestone, which we're using as this repo's backlog. Issues here won't be marked stale again.

Sorry for the confusion and thank you for your contributions.

@Kielek Kielek added the help wanted Good for taking. Extra help will be provided by maintainers label Jan 21, 2025
@Kielek
Copy link
Contributor

Kielek commented Jan 21, 2025

@pellared, I doubt that it is candidate do the first contribution. Fos sure, it will be great to have some PRs, marking only as help wanted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Good for taking. Extra help will be provided by maintainers pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package
Projects
None yet
Development

No branches or pull requests

5 participants