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

Revise handling of null and empty attribute values #948

Closed
arminru opened this issue Feb 28, 2020 · 2 comments · Fixed by #1026
Closed

Revise handling of null and empty attribute values #948

arminru opened this issue Feb 28, 2020 · 2 comments · Fixed by #1026
Assignees
Labels

Comments

@arminru
Copy link
Member

arminru commented Feb 28, 2020

In #771 we introduced handling of null and empty strings by dropping them silently.
At this time, the expected behavior was not yet defined in the OTel specification. This was now added to in open-telemetry/opentelemetry-specification#459 (open-telemetry/opentelemetry-specification@23dbc05).

The following changes have to be made to conform to the spec:

  • empty string values and empty arrays must NOT be dropped but stored since these are valid attribute values
  • null values must still be ignored but since OTel-Java support overwriting of attributes, setting null must result in removing a previously set attribute from the map - same goes with arrays that are null themselves
@bogdandrutu
Copy link
Member

@arminru @thisthat are you planing to have a PR for this?

@thisthat
Copy link
Member

thisthat commented Mar 9, 2020

@bogdandrutu I was pending on #807 to be merged. If you prefer, we can close #807 and I can address null/empty attributes and arrays in this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants