Skip to content

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
1 participant