-
Notifications
You must be signed in to change notification settings - Fork 182
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
Limit HTTP request method cardinality: canonical method (Option B/D) #34
Conversation
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'm favor of this option because of:
http.request.method
is kept "as-is". We don't add any automatic value to it in case it has "not known" methods likeGet
orxyz
. Existing dashboards, queries customers may have on them will continue to work- Addresses the issue with metric cardinality
Although I can see this may be a more general problem will appear in other attributes so I'm unsure if we should go ahead with it.
brief: 'HTTP request method.' | ||
- id: request.canonical_method | ||
type: | ||
allow_custom_values: true |
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.
Should this allow custom values though? If we want to offer this as a "control" for cardinality, I feel maybe we have to lock it down?
If the HTTP request method is not known to the instrumentation, it MUST set the `http.request.canonical_method` attribute to `other` and SHOULD | ||
populate the exact method passed by client on `http.request.method` attribute. | ||
|
||
HTTP method names are case-sensitive and `http.request.canonical_method` attribute value MUST match a standard (or documented elsewhere) HTTP method name exactly. |
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.
Should we say it must match the enum we defined here? Otherwise it seems much like another open attribute if the standard is not clearly defined by OTel.
we're already breaking these dashboards in the next http semconv release with the rename from also, I think the canonicalized http method may be better for dashboards (where you are often want to aggregate things better) I think the primary use case that is hurt by the canonicalized value being the "default" ( |
@joaopgrassi The problem with this approach is that high-quality instrumentations that avoid duplication would only put invalid methods into If we populate Essentially this option makes everyone pay more for their telemetry with no clear benefit (compared to option A). |
@trask Ah yes, good point forgot that was also changed recently 👍
But isn't it what the PR accommodates for today here:?
If there are attacks with invalid methods, those will surface and be populated on
I 100% agree, we shouldn't duplicate tings. But if the goal is to surface invalid/malicious values I feel the way it is written today is enough? What is not clear with the text in the PR is what to do with |
the problem is that with this PR we essentially reserve
HTTP method is case-sensitive, i.e. according to the standard So the proposal is to allow instrumentations to take into account if their web framework supports case-insensitive methods and if yes, they should record |
Closing this proposal because of duplication concerns. |
Implements option b (or d) from #17