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 inconsistent label cardinality error #224

Merged
merged 1 commit into from
May 27, 2019
Merged

Fix inconsistent label cardinality error #224

merged 1 commit into from
May 27, 2019

Conversation

ptqa
Copy link
Contributor

@ptqa ptqa commented May 24, 2019

Hi.

I've faced issue with latest statsd version: Failed to update metric "asr_duration". Error: inconsistent label cardinality: expected 0 label values but got 4 in prometheus.Labels

It happened after this commit d143398

Basically we sort prometheus labels (https://github.com/prometheus/statsd_exporter/blob/master/exporter.go#L461) before fill structure (https://github.com/prometheus/statsd_exporter/blob/master/exporter.go#L470)

Fixes issue for me, also rollback to v0.9.0 fixes it.

@matthiasr
Copy link
Contributor

Thank you for finding this! #222 is functionally the same fix, and it also has a test to prevent regressions, so I hope you don't mind if I close this PR and go with that?

@matthiasr matthiasr closed this May 24, 2019
@matthiasr matthiasr reopened this May 27, 2019
@matthiasr
Copy link
Contributor

Change of plan, since #222 is blocked on the DCO sign-off I'm going to merge this for now.

@matthiasr matthiasr merged commit 56a091a into prometheus:master May 27, 2019
matthiasr pushed a commit that referenced this pull request May 27, 2019
@claytono
Copy link
Contributor

Sorry for introducing this. We don't use label mapping in our environment, so I missed this :(

@ptqa
Copy link
Contributor Author

ptqa commented May 27, 2019

@claytono no problem, it's a minor thing, happens to everybody

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.

3 participants