question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expose a way to log response headers

See original GitHub issue

Describe the problem you’d like to have solved

I recently have been going back and fourth on a ticket with support regarding latency we were experiencing. I have been asked on multiple occasions by the support team to provide request ids that come back as a response header x-auth0-requestid. This is frustrating because this SDK does not expose a way to log these.

Describe the ideal solution

For my use case, I think the ideal solution would be to expose a way to add an interceptor to the OkHttp client. This would give consumer access to what they need (headers, etc) without the SDK being opinionated about what it should log and adding something that would need maintained by the SDK over time (the header names changing, etc).

If exposing the ability to add a custom interceptor is too much, it should be enough to expose the log level of the HttpLoggingInterceptor that is added to the OkHttp client today. The SDK sets the log level to Level.NONE currently.

Alternatives and current work-arounds

Additional information, if any

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jimmyjamescommented, Jan 21, 2022

The changes in #392 are included in v1.37.0, which will be available in Maven shortly. Thanks for the collaboration on this! 🙇

1reaction
dpromankocommented, Jan 12, 2022

@jimmyjames I tested these changes locally with my application and it functions exactly as I would expect using LogLevel.HEADERS.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reading response headers with Fetch API - Stack Overflow
Set Access-Control-Allow-Headers when allowing headers to be passed from the client to the server (e.g. If-Match ). Set Access-Control-Expose- ...
Read more >
Response.headers - Web APIs - MDN Web Docs
The headers read-only property of the Response interface contains the Headers object associated with the response.
Read more >
Understanding response headers policies - Amazon CloudFront
You can use a response headers policy to specify the HTTP headers that Amazon CloudFront adds to responses that it sends to viewers....
Read more >
Why are not all response headers exposed
This is done through the Access-Control-Expose-Headers response header. It "indicates which headers can be exposed as part of the response by listing their ......
Read more >
HTTP Reference - Quarkus
10. Configuring HTTP Access Logs ; SSL session id. %{SSL_SESSION_ID} ; All request headers. %{ALL_REQUEST_HEADERS} ; Cookie value. %{c,cookie_name} ; Query ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found