Skip to content

fix bug issue#3118 and issue#3161#3310

Merged
bogdandrutu merged 1 commit intoopen-telemetry:mainfrom
tydhot:bugfix0526
May 26, 2021
Merged

fix bug issue#3118 and issue#3161#3310
bogdandrutu merged 1 commit intoopen-telemetry:mainfrom
tydhot:bugfix0526

Conversation

@tydhot
Copy link
Copy Markdown
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
Copy Markdown
Member Author

tydhot commented May 26, 2021

cc: @bogdandrutu @gramidt @jpkrohling

@bogdandrutu
Copy link
Copy Markdown
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