-
Notifications
You must be signed in to change notification settings - Fork 278
feat(metrics-sdk)!: Metrics cardinality limit #1909
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
base: main
Are you sure you want to change the base?
feat(metrics-sdk)!: Metrics cardinality limit #1909
Conversation
…o metrics-cardinality-limit
|
👋 This pull request has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the |
|
👋 This pull request has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the |
Description
This PR introduces cardinality limits for metric attributes, as defined in the metrics SDK specification.
Users can configure the cardinality limit in two ways:
If no limit is provided, the default value of 2000 is used (also negative value will turn to 0 for the limit).
The cardinality limit is enforced during the aggregation update process. When the number of unique attribute combinations exceeds the limit, the extra data points are grouped into a separate data point with the attribute:
This overflow data point is treated like any other data point.
Future work: There is currently duplicated logic across different aggregation implementations. A shared base aggregation class should be introduced to reduce repetition.