Skip to content

chore: add tx metrics and logs for serialization errors #15215

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

Merged
merged 12 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
spelling errors
  • Loading branch information
Emyrk committed Oct 24, 2024
commit d3bbe9b9aa5dae9b1b976a634956fad9fa180448
6 changes: 3 additions & 3 deletions coderd/coderdtest/promhelp/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ func MetricValue(t testing.TB, reg prometheus.Gatherer, metricName string, label
for _, m := range metrics {
if m.GetName() == metricName {
for _, labeled := range m.GetMetric() {
mLables := make(prometheus.Labels)
mLabels := make(prometheus.Labels)
for _, v := range labeled.GetLabel() {
mLables[v.GetName()] = v.GetValue()
mLabels[v.GetName()] = v.GetValue()
}
if maps.Equal(mLables, labels) {
if maps.Equal(mLabels, labels) {
return labeled
}
}
Expand Down
2 changes: 1 addition & 1 deletion coderd/database/dbmetrics/dbmetrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (m metricsStore) InTx(f func(database.Store) error, options *database.TxOpt
if options.ExecutionCount() > 1 {
l := m.logger.Warn
if err != nil {
// Error leve if retries were not enough
// Error level if retries were not enough
l = m.logger.Error
}
// No context is present in this function :(
Expand Down
Loading