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

fix(sdk-metrics): fix duplicated registration of metrics for collectors #3488

Merged

Conversation

legendecas
Copy link
Member

Which problem is this PR solving?

Fixes #3472

Short description of the changes

  • Fixes that MetricStorageRegistry.findOrUpdateCompatibleCollectorStorage always returns undefined, which leads to duplicated registration of metric storage for a collector.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Verified that MetricStorageRegistry.findOrUpdateCompatibleCollectorStorage returns the expected value.

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added

@legendecas legendecas marked this pull request as ready for review December 15, 2022 07:41
@legendecas legendecas requested a review from a team December 15, 2022 07:41
@codecov
Copy link

codecov bot commented Dec 15, 2022

Codecov Report

Merging #3488 (c54ba3b) into main (93222fc) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3488   +/-   ##
=======================================
  Coverage   93.78%   93.78%           
=======================================
  Files         249      249           
  Lines        7610     7610           
  Branches     1587     1587           
=======================================
  Hits         7137     7137           
  Misses        473      473           
Impacted Files Coverage Δ
...ges/sdk-metrics/src/state/MetricStorageRegistry.ts 96.49% <100.00%> (+1.75%) ⬆️
...emetry-core/src/platform/node/RandomIdGenerator.ts 87.50% <0.00%> (-6.25%) ⬇️

@dyladan
Copy link
Member

dyladan commented Dec 15, 2022

Simpler than expected fix

@legendecas legendecas merged commit 3fd6fb8 into open-telemetry:main Jan 3, 2023
@legendecas legendecas deleted the metrics/collector-registry branch January 3, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Instrumentation Double-Init / Caching Bug w/ Prometheus Exporter
3 participants