-
Notifications
You must be signed in to change notification settings - Fork 772
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
[metrics] Document view level cardinality limit #5321
[metrics] Document view level cardinality limit #5321
Conversation
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
`SetMaxMetricPointsPerMetricStream` method, or at individual | ||
[view](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#view) | ||
level. Refer to this | ||
level using `MetricStreamConfiguration.CardinalityLimit`. Refer to this | ||
[doc](../../docs/metrics/customizing-the-sdk/README.md#changing-maximum-metricpoints-per-metricstream) |
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.
This section can be updated to be: "../../docs/metrics/customizing-the-sdk/README.md#changing-the-cardinalityLimit", given the name standardization effort: https://github.com/open-telemetry/opentelemetry-dotnet/pull/5328/files.
@@ -356,18 +356,13 @@ predictable and reliable behavior when excessive cardinality happens, whether it | |||
was due to a malicious attack or developer making mistakes while writing code. | |||
|
|||
OpenTelemetry has a default cardinality limit of `2000` per metric. This limit | |||
can be configured at `MeterProvider` level using | |||
can be configured at `MeterProvider` level using the | |||
`SetMaxMetricPointsPerMetricStream` method, or at individual |
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.
`SetMaxMetricPointsPerMetricStream` method, or at individual | |
`SetCardinalityLimit` method, or at individual |
Might be nice to explicitly point out in the metrics readme file that cardinality limit will be pre-allocated to prevent user from abusing it. |
This is captured here https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/docs/metrics#memory-preallocation. |
I merged this and then put some updates on #5328 |
Follow up #5312.