Skip to content

Commit

Permalink
Merge pull request #236 from movio/log-request-id
Browse files Browse the repository at this point in the history
Log out request ID when the plugin is enabled
  • Loading branch information
Lucian Jones authored Dec 3, 2023
2 parents 07dc77d + c3708dc commit a7ea311
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/request_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
})
Expand Down

0 comments on commit a7ea311

Please sign in to comment.