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 bug issue#3118 and issue#3161 #3310

Merged
merged 1 commit into from
May 26, 2021
Merged

Conversation

tydhot
Copy link
Member

@tydhot tydhot commented May 26, 2021

I have met same problem like these issues #3118,#3161, and I debug found here:
image
Same metric with different order lablemap will get a different key in accumulator's map. And same metric will be in the Map with different key, when accumulator is collecting, only the first one will be exported to prometheus. Some key will never be exported because of prometheus will only get the first one. I found sort it before generate the key, there will only one metric in accumulator's map, and every metric will be exported.

@tydhot tydhot requested a review from a team May 26, 2021 04:19
@tydhot
Copy link
Member Author

tydhot commented May 26, 2021

cc: @bogdandrutu @gramidt @jpkrohling

@bogdandrutu
Copy link
Member

/cc @Aneurysm9 @rakyll @dashpole

@bogdandrutu bogdandrutu linked an issue May 26, 2021 that may be closed by this pull request
@bogdandrutu bogdandrutu merged commit ab06820 into open-telemetry:main May 26, 2021
dashpole pushed a commit to dashpole/opentelemetry-collector that referenced this pull request Jun 14, 2021
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.

Inaccurate data collected by prometheus receiver
3 participants