-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Memory leak in global MeterProvider #5753
Comments
Fixes #5753 The added test fails on main, but passes after the fix. --------- Co-authored-by: Sam Xie <[email protected]>
It appears that this change has broken metrics that are registered before I am pretty new to Otel and Go but this change seems to break the connection pools convention outlined here. Currently I am seeing this when instrumenting a Redis Cluster as it creates instrumentation for the connection pool to each node in the cluster. https://github.com/redis/go-redis/blob/233f97accde15bcb2e3d86ee744109b4dce34171/extra/redisotel/metrics.go#L85 This problem is removed if we apply the instrumentation after we call |
I am able to reproduce the exception with the following test case
|
@Jesse-Bonfire I opened a new issue to track it: #5827 |
Description
Forked from open-telemetry/opentelemetry-go-contrib#5190
Expected behavior
We should not leak memory when a user creates the same instrument repeatedly
The text was updated successfully, but these errors were encountered: