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

update promMetrics interface and use collect fn #841

Merged
merged 6 commits into from
May 15, 2024
Merged

Conversation

busma13
Copy link
Contributor

@busma13 busma13 commented May 13, 2024

This PR makes the following changes:

  • adds a static object counters to CountByField to track all field counts across multiple operations
  • add default labels from worker to count_by_field_count_total metric
  • addCounter now uses a collect() function to increment count only at time of /metrics endpoint scrape
  • _incMetric now increments its value in counters instead of the promMetrics directly
  • tests that use promMetrics now manually init the API
  • tests use test.context.apis.scrapePromMetrics() to get metrics directly from prom-client

@busma13 busma13 marked this pull request as ready for review May 15, 2024 18:50
@busma13 busma13 requested review from godber and sotojn May 15, 2024 18:50
@godber godber merged commit 552e41f into master May 15, 2024
3 checks passed
@godber godber deleted the update-prom-metrics branch May 15, 2024 20:13
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