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

docs: example - avoid duplicate metrics with same name and labels #320

Conversation

corporate-gadfly
Copy link
Contributor

No description provided.

@corporate-gadfly
Copy link
Contributor Author

Perhaps you may know something about it, but when bumping from 0.12.1 to 0.12.2, a query that was returning duplicate rows was giving errors:

ts=2023-09-16T19:38:51.958Z caller=klog.go:124 level=error func=Errorf msg="Error gathering metrics:
....
gauge:{value:5.24288e+08}} was collected before with the same name and label values

So, I introduced an element in the WHERE clause to de-duplicate the returned rows.

@burningalchemist
Copy link
Owner

burningalchemist commented Sep 16, 2023

Hey @corporate-gadfly, this example was contributed before. I don't have access to Azure to check it. So, thanks for checks and improvements. 🙂👍

@burningalchemist burningalchemist changed the title avoid duplicate metrics with same name and label values docs: example - avoid duplicate metrics with same name and label values Sep 16, 2023
@burningalchemist burningalchemist changed the title docs: example - avoid duplicate metrics with same name and label values docs: example - avoid duplicate metrics with same name and labels Sep 16, 2023
@burningalchemist burningalchemist merged commit 105d9f9 into burningalchemist:master Sep 16, 2023
3 checks passed
@corporate-gadfly
Copy link
Contributor Author

@burningalchemist : No worries. I'm the original submitter of the example.

@corporate-gadfly corporate-gadfly deleted the skip-duplicate-names-and-labels branch September 16, 2023 23:58
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.

2 participants