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:
@ -2,7 +2,6 @@ package idpsync_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
@ -324,7 +323,7 @@ func TestNoopNoDiff(t *testing.T) {
|
||||
// and 'UpdateMemberRoles'.
|
||||
mDB.EXPECT().InTx(
|
||||
gomock.Any(), gomock.Any(),
|
||||
).DoAndReturn(func(f func(database.Store) error, _ *sql.TxOptions) error {
|
||||
).DoAndReturn(func(f func(database.Store) error, _ *database.TxOptions) error {
|
||||
err := f(mDB)
|
||||
return err
|
||||
})
|
||||
|
Reference in New Issue
Block a user