-
Notifications
You must be signed in to change notification settings - Fork 68
feat(PVO11Y-4761): Add Kanary signal exporter #574
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
base: main
Are you sure you want to change the base?
feat(PVO11Y-4761): Add Kanary signal exporter #574
Conversation
d3779d6
to
6a403f0
Compare
Depends on #576 |
0afa481
to
27b8e81
Compare
/retest |
if err != nil { | ||
log.Fatalf("FATAL: Error connecting to the database using DSN from %s: %v", dbURLEnvVar, err) | ||
} | ||
defer db.Close() |
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.
Would move the defer Close right after opening, so the open and error logic are together.
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.
Good point, moving it now
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.
The defer is at multiple places following the same patter: open, error, close
It would make sense to move the close in other places as well.
e697cd6
to
23ba13a
Compare
d9cfc2f
to
857f5c0
Compare
This commit introduces a new exporter to fetch Kanary signal values from a database and expose them as Prometheus metrics. Includes: - Core exporter logic for PostgreSQL. - `kanary_signal` metric with `cluster` and `status` labels. - `kanary_interruption` metric with `cluster` and `reason` labels - Use PedanticRegistry to control exposed Prometheus metrics. This ensures only explicitly registered application metrics are exported. - Unit tests using sqlmock. - README.md Signed-off-by: Faisal Al-Rayes <[email protected]>
857f5c0
to
042b9e2
Compare
This commit introduces a new exporter to fetch Kanary signal values from a database and expose them as Prometheus metrics.
Includes:
kanary_signal
metric withcluster
andstatus
labels.kanary_interruption
metric withcluster
andreason
labels