-
Notifications
You must be signed in to change notification settings - Fork 518
[Feature]: Is there a way to remove useless metrics attributes? #1451
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
Comments
OTel SDK offers a View concept which can be leveraged to drop unwanted metric attributes. Another alternative is, if you control the code, you can simply chose to add only the required metric attributes. If you cannot control the code, then View is the right solution from the SDK. (OTel Collector has similar mechanisms as well, if you are running OTel Collector in your environment) |
Curious, as we have the upper cardinality limit of 2000, the memory shouldn't be increasing continuously leading to OOM. What is the machine configuration? Eventually, we should be able to control the upper limit through Views (#1065). But as mentioned by @cijothomas, the right approach would be to filter the attributes through Views. |
The cardinality capping is in the newer version, definitely not in 0.19.0! |
Ah, I overlooked the version |
Thanks for your reply!
Any solution to resolve this "attributes key is constant but value is changing" problem? |
Many thanks! |
The new SDK will impose cardinality limit, so SDK wont go OOM. |
Related Problems?
I'm using rust opentelemetry_sdk 0.19.0,and dump some metrics to opentelemetry collector,and one more things, the metrics attributes are changing always in my scenario, so the memory usage is increasing, and lead to oom issue finally.
So is there any way to cleanup these unused metrics attributes?
Describe the solution you'd like:
In my project, I also use Prometheus to dump metrics, to resolve the above issue, Prometheus provides a remove_label_values() api, so this is not a issue for Prometheus, could Opentelemetry SDK also provides a similar API?
Considered Alternatives
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: