Skip to content

Add more metrics to prometheus endpoint #262

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

Closed
wants to merge 1 commit into from

Conversation

magec
Copy link
Collaborator

@magec magec commented Dec 19, 2022

Currently prometheus endpoint only outputs metrics related with 'stats' (those shown in a SHOW STATS admin command).

This change:

  • Adds server metrics to prometheus endpoint.
  • Adds database metrics to prometheus endpoint.
  • Adds pools metrics to prometheus endpoint.
  • Change metrics name to have a prefix of (stats|pools|databases|servers).

This change is not backward compatible as metric names are now prefixed. Maybe we can leave current metric names 'as is' and add prefixes only for the new stuff, but I like it more with everything prefixed.

/cc @dat2

@magec magec force-pushed the improve-prometheus-metrics branch from 69409da to 9a8782f Compare December 19, 2022 12:30
This change:
- Adds server metrics to prometheus endpoint.
- Adds database metrics to prometheus endpoint.
- Adds pools metrics to prometheus endpoint.
- Change metrics name to have a prefix of (stats|pools|databases|servers).
@magec magec force-pushed the improve-prometheus-metrics branch from 9a8782f to 4088faf Compare December 19, 2022 15:34
@magec magec closed this Dec 19, 2022
@magec
Copy link
Collaborator Author

magec commented Dec 19, 2022

Will make some changes before.

@magec
Copy link
Collaborator Author

magec commented Dec 20, 2022

Ok, I changed some labels that read 'database' to pool, because they were mistakenly set. Also, now PrometheusMetric is implemented using generics, because values are sometimes u64 sometimes i32, etc. Before I used a u128 to ensure I could hold any kind of value, but I thought it was a waste of memory and reimplemented it like this.

@magec
Copy link
Collaborator Author

magec commented Dec 20, 2022

Could not reopen this one, opened a new PR (#263)

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.

1 participant