mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-03-17 20:57:51 +02:00
Fix panic instruments creation when setting meter provider (#5758)
Related #5757. This is a quick fix.
This commit is contained in:
parent
e47618fc36
commit
932a4d8a5f
@ -11,6 +11,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
||||
### Fixed
|
||||
|
||||
- Fix memory leak in the global `MeterProvider` when identical instruments are repeatedly created. (#5754)
|
||||
- Fix panic instruments creation when setting meter provider. (#5758)
|
||||
|
||||
### Removed
|
||||
|
||||
|
@ -141,7 +141,7 @@ func (m *meter) setDelegate(provider metric.MeterProvider) {
|
||||
m.registry.Remove(e)
|
||||
}
|
||||
|
||||
m.instruments = nil
|
||||
clear(m.instruments)
|
||||
m.registry.Init()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user