feat(observabillity): #115 integrate otel for metrics and traces
Some checks failed
Build Docker Image / Build-Docker-Image (push) Has been cancelled

This commit is contained in:
2025-06-07 12:18:41 +02:00
parent 7efaa0fc61
commit e2ff1221ca
32 changed files with 480 additions and 314 deletions

View File

@@ -17,19 +17,19 @@ func TransformAndLogDbError(module string, r sql.Result, err error) error {
if errors.Is(err, sql.ErrNoRows) {
return ErrNotFound
}
log.Error("%v: %v", module, err)
log.L.Error("database sql", "module", module, "err", err)
return types.ErrInternal
}
if r != nil {
rows, err := r.RowsAffected()
if err != nil {
log.Error("%v: %v", module, err)
log.L.Error("database rows affected", "module", module, "err", err)
return types.ErrInternal
}
if rows == 0 {
log.Info("%v: not found", module)
log.L.Info("row not found", "module", module)
return ErrNotFound
}
}