mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 08:50:42 +02:00
envoy: use envoy request id for logging across systems with http and gRPC (#691)
This commit is contained in:
parent
593c47f8ac
commit
41855e5419
16 changed files with 228 additions and 253 deletions
|
@ -7,6 +7,7 @@ import (
|
|||
|
||||
"github.com/pomerium/pomerium/internal/frontend"
|
||||
"github.com/pomerium/pomerium/internal/log"
|
||||
"github.com/pomerium/pomerium/internal/telemetry/requestid"
|
||||
"github.com/pomerium/pomerium/internal/urlutil"
|
||||
"github.com/pomerium/pomerium/internal/version"
|
||||
)
|
||||
|
@ -65,10 +66,7 @@ func (e *HTTPError) ErrorResponse(w http.ResponseWriter, r *http.Request) {
|
|||
w.WriteHeader(e.Status)
|
||||
|
||||
log.FromRequest(r).Info().Err(e).Msg("httputil: ErrorResponse")
|
||||
var requestID string
|
||||
if id, ok := log.IDFromRequest(r); ok {
|
||||
requestID = id
|
||||
}
|
||||
requestID := requestid.FromContext(r.Context())
|
||||
response := errResponse{
|
||||
Status: e.Status,
|
||||
StatusText: http.StatusText(e.Status),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue