fix(observabillity): include otel logs
All checks were successful
Build Docker Image / Build-Docker-Image (push) Successful in 5m33s
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Successful in 5m4s

This commit was merged in pull request #158.
This commit is contained in:
2025-06-07 15:12:18 +02:00
parent e65146c71c
commit 63ade5916e
26 changed files with 231 additions and 185 deletions

View File

@@ -3,7 +3,7 @@ package service
import (
"crypto/rand"
"encoding/base64"
"spend-sparrow/internal/log"
"log/slog"
"spend-sparrow/internal/types"
"github.com/google/uuid"
@@ -26,7 +26,7 @@ func (r *RandomImpl) Bytes(size int) ([]byte, error) {
b := make([]byte, 32)
_, err := rand.Read(b)
if err != nil {
log.L.Error("Error generating random bytes", "err", err)
slog.Error("Error generating random bytes", "err", err)
return []byte{}, types.ErrInternal
}
@@ -36,7 +36,7 @@ func (r *RandomImpl) Bytes(size int) ([]byte, error) {
func (r *RandomImpl) String(size int) (string, error) {
bytes, err := r.Bytes(size)
if err != nil {
log.L.Error("Error generating random string", "err", err)
slog.Error("Error generating random string", "err", err)
return "", types.ErrInternal
}
@@ -46,7 +46,7 @@ func (r *RandomImpl) String(size int) (string, error) {
func (r *RandomImpl) UUID() (uuid.UUID, error) {
id, err := uuid.NewRandom()
if err != nil {
log.L.Error("Error generating random UUID", "err", err)
slog.Error("Error generating random UUID", "err", err)
return uuid.Nil, types.ErrInternal
}