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

OpenTelemetry does not support resetting in-memory Metric to clean the memory usage #3788

Closed
valiparsa opened this issue Dec 13, 2023 · 2 comments
Assignees
Labels
spec:metrics Related to the specification/metrics directory

Comments

@valiparsa
Copy link

This issue was initially created in the open-telemetry/opentelemetry-go/issues#4752 but it was suggested to open a new issue in this repository first.

What are you trying to achieve?

We are using Kyverno as a Policy engine in the Kubernetes environment in our product. We often see an increase in the memory consumption of the Kyverno pod due to collected in-memory metrics which have high cardinality due to many labels.

Up-to and including release-1.7 of Kyverno it was using the Prometheus library directly to expose Metrics. Prometheus client library supports reseting metric vectors which were used by Kyverno to periodically (configurable period) reset its internal metrics registry to clean its memory usage and footprint associated with metrics.

As of release-1.8 Kyverno started to support OpenTelemetry. After this transition this feature of reseting internal metrics to clean its memory usage is lost as OpenTelemetry does not allow reseting metrics, which is supported by the underlying Prometheus library.

What did you expect to see?

OpenTelemetry should support reseting the in-memory metric vectors allowing to clean its memory usage. As this is supported by Prometheus to reset the Metric vectors and OpenTelemetry is using Prometheus client library hence, it would be very beneficial for us to consume this feature again in the Kyverno project.

Additional context.

As mentioned the underlying Prometheus library supports reseting in-memory Metric vectors to clean the memory usage.

@valiparsa valiparsa added the spec:metrics Related to the specification/metrics directory label Dec 13, 2023
@jack-berg
Copy link
Member

I believe this is a duplicate of #2232. Can you take a look and if so, close this issue and include the details here on that issue?

@jack-berg
Copy link
Member

Please feel free to re-open if you feel its a different issue.

@jack-berg jack-berg closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec:metrics Related to the specification/metrics directory
Projects
None yet
Development

No branches or pull requests

3 participants