Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
OTLP exporter: Standardize handling of attributes #3262
OTLP exporter: Standardize handling of attributes #3262
Changes from 8 commits
d023078
576e5de
73565d2
3103f5e
6d556e6
22d82cd
ca49c93
7b0b0df
7d3e2d8
8624117
4fb368f
4140a19
166364a
3bafc05
525a988
389c50a
8e68dd7
4d90927
330ab73
1b18cff
c7893de
55979bf
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would be a breaking change? as we were doing ToString() before, and now we ignore the value? should we retain the current behavior?
(Or we treat current behavior as a unintentional bug, and this is indeed the fix)
Either way - please add to changelog entry as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where I'm leaning but want to hear other opinions. While unusual, I have seen a
ToString
overload be susceptible to exceptions, mutating state, and even deadlock.As an end user, I'd prefer to have to be intentional about how I'm ToStringing my attributes that are not just simple numeric types or strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the right change.
One thing to note is - do we log anywhere about this? i.e if I miss some values, and i enable self-diagnostics, would there be something that tells me exporter is dropping things?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At one point, I thought the Jaeger and Zipkin exporters did not ToString arbitrary attributes. I guess they do now. So, I'm ok
ToString
ing everything else if that's what folks prefer.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No logging at the moment - will add.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, we should update Zipkin, Jaeger, Console, Prometheus to behave the same. Maybe there's some way to unify this logic, but I haven't put my mind to this yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From SIG meet: revert to use ToString(), and explore IFormattable in a follow up.