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

PMM-10271 Fix meta-metric label for general collector #515

Merged
merged 4 commits into from
Jul 7, 2022

Conversation

ShashankSinha252
Copy link
Contributor

@ShashankSinha252 ShashankSinha252 commented Jul 7, 2022

Fix for PMM-10271 and PMM-10279

Meta-metric generated for general collector were incorrectly labeled as dbstats. When dbstats and general collector were executed for a scrape request, two metric were generated with the same name and labels. This duplicate metric would trigger a panic in the metric generation library. This change updates the label for general collector and fixes the issue.

FB link : Percona-Lab/pmm-submodules#2627

Meta-metric generated for general collector were incorrectly labeled as
dbstats. When dbstats and general collector were executed for a scrape request,
two metric were generated with the same name and labels. This duplicate metric
would trigger a panic in the metric generation library. This change updates the
label for general collector and fixes the issue.
@ShashankSinha252 ShashankSinha252 added this to the v0.33.0 milestone Jul 7, 2022
@ShashankSinha252 ShashankSinha252 self-assigned this Jul 7, 2022
@ShashankSinha252
Copy link
Contributor Author

TestServerStatusDataCollector is failing for MongoDB 4.4 and 5.0. Failure looks unrelated to changes for meta-metrics. Will debug and fix it in a separate PR.

filter := []string{
"collector_scrape_time_ms",
}
count := testutil.CollectAndCount(c, filter...)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metric value may fluctuate for every run. Hence checking only presence of metric.

filter = []string{
"mongodb_up",
}
err := testutil.CollectAndCompare(c, expected, filter...)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comparing required metric and ignoring everything else.

@BupycHuk BupycHuk merged commit aa149b4 into main Jul 7, 2022
@BupycHuk BupycHuk deleted the PMM-10271-fix-meta-metric-label-dbstats branch July 7, 2022 10:40
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.

4 participants