fix(observabillity): include otel logs
Some checks failed
Build Docker Image / Build-Docker-Image (push) Failing after 4m29s

This commit is contained in:
2025-06-07 15:12:18 +02:00
parent e65146c71c
commit 661a3ba79f
26 changed files with 230 additions and 184 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
}