-
Notifications
You must be signed in to change notification settings - Fork 2
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
Prometheus config fallbacks #115
base: main
Are you sure you want to change the base?
Conversation
a2ae88f
to
768e5c9
Compare
pkg/metrics/config.go
Outdated
} | ||
|
||
stmt, _ := db.BuildUpsertStmt(&schemav1.Config{}) | ||
if _, err := db.NamedExecContext(ctx, stmt, configPairs); err != nil { |
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.
Do the INSERT
s/UPDATE
s in a serializable transaction. Think about why this is a good idea and whether the other side should do that too. See here for how we do it in Icinga DB: https://github.com/Icinga/icingadb/blob/main/pkg/icingadb/ha.go#L289.
As this is a pattern that we are now using a second time, you should consider how this could be done using a function.
e4223a9
to
e9917b7
Compare
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.
Please resolve conflicts 😆
8435531
to
72fe379
Compare
72fe379
to
ccb4b0f
Compare
2a378e3
to
5310012
Compare
5310012
to
308520c
Compare
Add more options to set Prometheus config: