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

Solving http.request.method cardinality (and similar) with metrics hints API #68

Closed
lmolkova opened this issue Jun 1, 2023 · 1 comment
Assignees

Comments

@lmolkova
Copy link
Contributor

lmolkova commented Jun 1, 2023

Original issue: open-telemetry/opentelemetry-specification#3470

TL;DR: http.request.method can have high cardinality, especially when a malicious or buggy client sends requests with invalid methods. Servers don't have control over this behavior.

The problem is generic and could be solved with hint API that

  • allows applications to specify known/prioritized values to record
  • SDK follows hint API and records known values, and records unknown ones with 'unknown'/'other' (TBD) value

In the context of http.request.method:

  • general-purpose instrumentation libraries SHOULD configure a hint with standard method names
  • SDK users MAY override it and allow additional methods

This approach is outlined in #35

Pros:

  • generic solution not specific to one attribute

Cons:

  • cannot be applied to other signals if they need to have low cardinality (e.g. span names)
  • can't query across signals for attributes with capped values.
@lmolkova
Copy link
Contributor Author

This can now be closed as we went ahead with approach in #17

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

No branches or pull requests

2 participants