From c3708dcb8cc0572d7ef1412c182a95dfbf512bd0 Mon Sep 17 00:00:00 2001 From: Lucian Jones Date: Mon, 4 Dec 2023 10:49:59 +1300 Subject: [PATCH] Log out request ID when the plugin is enabled --- plugins/request_id.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/request_id.go b/plugins/request_id.go index 1bcbb02f..2eda3660 100644 --- a/plugins/request_id.go +++ b/plugins/request_id.go @@ -29,6 +29,9 @@ func (p *RequestIdentifierPlugin) middleware(h http.Handler) http.HandlerFunc { } ctx := r.Context() + + bramble.AddField(ctx, "request.id", requestID) + ctx = bramble.AddOutgoingRequestsHeaderToContext(ctx, BrambleRequestHeader, requestID) h.ServeHTTP(rw, r.WithContext(ctx)) })