-
Notifications
You must be signed in to change notification settings - Fork 175
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
Remove dashes to underscores normalization from http header attribute keys #369
Remove dashes to underscores normalization from http header attribute keys #369
Conversation
41ad5b2
to
be84f79
Compare
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.
The same change also needs to be applied to response headers to stay consistent:
http.response.header.<key>
HTTP response headers,<key>
being the normalized HTTP Header name (lowercase, with-
characters replaced by_
), the value being the header values. [5]
http.response.header.content_type=["application/json"]
;http.response.header.my_custom_header=["abc", "def"]
Definitely, and in case we decide to do this for HTTP, we probably should also do it for RPC. Likely not in this PR, but at least note it in issues: |
I would say, please do it also in this PR. This should stay consistent. I'd rather leave HTTP unchanged than change only HTTP and leave RPC in an inconsistent state if we then in the rpc follow-up figure out the reasons for the normalization. |
RPC handling adapted to match HTTP in 16bc32a
Based on our discussion in Semconv, I'm against this change. I think we should either:
|
+1 (not blocking it from my side though, if we end up with lowercasing only) I'm leaning towards:
Lowercasing would be for the sake of cardinality, right? But, all the attributes being touched in this PR are not part of metric dimensions, so cardinality should not be an issue. |
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.
Approving following the reasoning @trask provided in #369 (comment)
Lowercasing is only for the keys (not the values, so not related to cardinality). If we don't lowercase the keys, then we end up with different keys, e.g. |
I don't believe |
👍 Agreeing with @trask, lowercasing makes sense here because we're "converting" from a case-insensitive to a case-sensitive format. It doesn't cause conflicts (because the origin format is case-insensitive), and I think it drastically improves the user experience. If I don't have that normalization and I'd want to filter for a certain content type, I'd theoretically need to look for all |
Most HTTP frameworks do the one or the other sort of normalizing of incoming headers because this eases the usage. This effects casing and concatenation/arrayfying. Simply because the spec is clear that casing doesn't matter and also it doesn't matter if headers which are allowed multiple times (e.g. tracestate) are sent as a single concat line or as array. Similar on sending side HTTP frameworks might decide on such normalization. In my opinion the main use of tracing is not to debug low level, framework specific low level details like the actual casing on the wire. It's more to monitor the HTTP request from functional point of view. If there is a use case to track also the low level bits and details (assuming the framework in use allows to extract this) I would add a separate set of attributes like |
Fixes #304
Changes
Removes the dashes to underscores normalization from http header attribute keys.
Merge requirement checklist
schema-next.yaml updated with changes to existing conventions.