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: ensure metric emission even when slice attr is empty #1395

Merged

Conversation

StarpTech
Copy link
Contributor

@StarpTech StarpTech commented Nov 22, 2024

Motivation and Context

The metric store accepts slice of attributes as a first argument. Those attributes will result in multiple metric emissions to produce correct metric series in prometheus. The problem was when we passed an empty slice. This resulted in no metric emission at all.

Checklist

  • I have discussed my proposed changes in an issue and have received approval to proceed.
  • I have followed the coding standards of the project.
  • Tests or benchmarks have been added or updated.
  • Documentation has been updated on https://github.com/wundergraph/cosmo-docs.
  • I have read the Contributors Guide.

@StarpTech StarpTech changed the title fix: emit once when slice attr is empty fix: ensure metric emission even when slice attr is empty Nov 23, 2024
Copy link
Contributor

@df-wg df-wg left a comment

Choose a reason for hiding this comment

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

@StarpTech StarpTech merged commit f576641 into main Nov 24, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants