From feab84f785fd883e67cee36e4dc24b61f7ab2428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Banaszewski?= Date: Wed, 12 Nov 2025 12:47:32 +0100 Subject: [PATCH 1/2] chore: add user-agent to interception logs (#50) --- interception.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/interception.go b/interception.go index 9422d01..2b9d08b 100644 --- a/interception.go +++ b/interception.go @@ -64,7 +64,12 @@ func newInterceptionProcessor(p Provider, logger slog.Logger, recorder Recorder, return } - log := logger.With(slog.F("route", r.URL.Path), slog.F("provider", p.Name()), slog.F("interception_id", interceptor.ID())) + log := logger.With( + slog.F("route", r.URL.Path), + slog.F("provider", p.Name()), + slog.F("interception_id", interceptor.ID()), + slog.F("user_agent", r.UserAgent()), + ) log.Debug(r.Context(), "interception started") if err := interceptor.ProcessRequest(w, r); err != nil { From 4e2ea1d88944c73ea111b42ada799373b3e982ca Mon Sep 17 00:00:00 2001 From: Danny Kopping Date: Wed, 12 Nov 2025 14:13:44 +0200 Subject: [PATCH 2/2] test2 Signed-off-by: Danny Kopping --- interception.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interception.go b/interception.go index 2b9d08b..f463f12 100644 --- a/interception.go +++ b/interception.go @@ -28,7 +28,7 @@ type Interceptor interface { var UnknownRoute = errors.New("unknown route") // The duration after which an async recording will be aborted. -const recordingTimeout = time.Second * 5 +const recordingTimeout = time.Second * 10 // newInterceptionProcessor returns an [http.HandlerFunc] which is capable of creating a new interceptor and processing a given request // using [Provider] p, recording all usage events using [Recorder] recorder.