mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
chore: add tx metrics and logs for serialization errors (#15215)
Before db_metrics were all or nothing. Now `InTx` metrics are always recorded, and query metrics are opt in. Adds instrumentation & logging around serialization failures in the database.
This commit is contained in:
@ -38,7 +38,7 @@ type wrapUpsertDB struct {
|
||||
resume <-chan struct{}
|
||||
}
|
||||
|
||||
func (w *wrapUpsertDB) InTx(fn func(database.Store) error, opts *sql.TxOptions) error {
|
||||
func (w *wrapUpsertDB) InTx(fn func(database.Store) error, opts *database.TxOptions) error {
|
||||
return w.Store.InTx(func(tx database.Store) error {
|
||||
return fn(&wrapUpsertDB{Store: tx, resume: w.resume})
|
||||
}, opts)
|
||||
|
Reference in New Issue
Block a user