Skip to content

Commit

Permalink
Fix trace id header not always being discovered correctly when loggin…
Browse files Browse the repository at this point in the history
…g traffic metrics (#504)

fix logging of traceid on traffic metrics
  • Loading branch information
DnlLrssn authored Sep 20, 2024
1 parent 6d72e4e commit afa0110
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions session/resthandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -856,8 +856,8 @@ func (transport *Transport) RoundTrip(req *http.Request) (*http.Response, error)

// Add trace ID to metric message if exist as header
traceID := ""
if req.Response != nil && req.Response.Header != nil {
traceID = req.Response.Header.Get("x-b3-traceid")
if resp.Header != nil {
traceID = resp.Header.Get("x-b3-traceid")
}
msg := ""
if traceID != "" {
Expand Down

0 comments on commit afa0110

Please sign in to comment.