-
Notifications
You must be signed in to change notification settings - Fork 104
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
Better compliance with status spec #246
Conversation
Codecov Report
@@ Coverage Diff @@
## main #246 +/- ##
==========================================
+ Coverage 36.33% 36.37% +0.04%
==========================================
Files 37 37
Lines 3162 3164 +2
==========================================
+ Hits 1149 1151 +2
Misses 2013 2013
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
e8557db
to
428591a
Compare
428591a
to
c9769d6
Compare
One callout is the spec calls for the API to have the function be called |
%% developer-facing error message | ||
message :: unicode:unicode_binary() | ||
message = <<"">> :: unicode:unicode_binary() |
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.
Why not unicode:chardata/0
? It would make the API a little bit simpler for the Erlang users.
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.
If I recall, we ran into some interop issues in some places around unicode charlists versus binary, so it settled out to using the binary everywhere as the default. I don't think it was this specific place (I believe it was around headers) but I think that was the origin of just doing the unicode binary.
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.
My only other question before approving is related, why not allow undefined
?
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 we'd need to check the exporter would work ok with that since it has to export a binary for that either way, but it wasn't allowed to begin with. There was always a binary value guard on it. I was just aiming to tighten down the allowed values for the status and the description with this.
Statuses are not allowed to be freeform and descriptions are only acceptable for errors. For the other statuses, descriptions are to be ignored.
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status