-
Notifications
You must be signed in to change notification settings - Fork 0
export metrics to track shared preload libraries in postgres #8
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
Conversation
exports one new metric,
`pg_shared_preload_libraries_library_enabled{library=<name}=1` per
library across the fleet
This helps us understand and track rollouts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving a comment as I am not trusted to review golang.
| "github.com/prometheus/client_golang/prometheus" | ||
| ) | ||
|
|
||
| const sharedPreloadLibrariesSubsystem = "shared_preload_libraries" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const sharedPreloadLibrariesSubsystem = "shared_preload_libraries" | |
| const sharedPreloadLibrariesSubsystem = "settings_shared_preload_libraries" |
If we're only ever going to emit a metric from querying pg_settings I think it's worth either applying that namespace in the metric constant, or in the namespace that's getting passed below, which I'm not sure where that comes from. Follow your heart.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gonna slightly adjust but yeah, agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm!
| @@ -0,0 +1,87 @@ | |||
| // Copyright 2024 The Prometheus Authors | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit 2025
| @@ -0,0 +1,187 @@ | |||
| // Copyright 2024 The Prometheus Authors | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same nit
exports one new metric,
pg_shared_preload_libraries_library_enabled{library=<name}=1perlibrary across the fleet
This helps us understand and track rollouts