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

@@ -1,16 +1,15 @@
package handler
import (
"errors"
"log/slog"
"net/http"
"net/url"
"spend-sparrow/internal/handler/middleware"
"spend-sparrow/internal/log"
"spend-sparrow/internal/service"
"spend-sparrow/internal/template/auth"
"spend-sparrow/internal/types"
"spend-sparrow/internal/utils"
"errors"
"net/http"
"net/url"
"time"
)
@@ -168,7 +167,7 @@ func (handler AuthImpl) handleVerifyResendComp() http.HandlerFunc {
_, err := w.Write([]byte("<p class=\"mt-8\">Verification email sent</p>"))
if err != nil {
log.L.Error("Could not write response", "err", err)
slog.Error("Could not write response", "err", err)
}
}
}
@@ -203,13 +202,13 @@ func (handler AuthImpl) handleSignUp() http.HandlerFunc {
var password = r.FormValue("password")
_, err := utils.WaitMinimumTime(securityWaitDuration, func() (any, error) {
log.L.Info("signing up", "email", email)
slog.Info("signing up", "email", email)
user, err := handler.service.SignUp(email, password)
if err != nil {
return nil, err
}
log.L.Info("Sending verification email", "to", user.Email)
slog.Info("Sending verification email", "to", user.Email)
go handler.service.SendVerificationMail(user.Id, user.Email)
return nil, nil
})
@@ -389,7 +388,7 @@ func (handler AuthImpl) handleForgotPasswordResponseComp() http.HandlerFunc {
pageUrl, err := url.Parse(r.Header.Get("Hx-Current-Url"))
if err != nil {
log.L.Error("Could not get current URL", "err", err)
slog.Error("Could not get current URL", "err", err)
utils.TriggerToastWithStatus(w, r, "error", "Internal Server Error", http.StatusInternalServerError)
return
}