Skip to content

Capture request/response headers for outgoing requests in Replay #7495

Description

@mydea

Similar to #7103, we may also want to capture the headers sent with requests.

Questions:

  • This should be PII-stripped automatically server side, I assume cc @cmanallen
    • If we provide a POJO of the headers, will each header be stripped separately?
  • Should we define a white list of headers we want to capture, or just all headers?
  • Should we capture headers for request AND response, or just for responses? (Note: For XHR, request headers are doable but a bit tricky)
  • A lot of the headers can be pretty static for each outgoing request, so there may be little value in capturing all of them.

Proposed solution

I propose to define a include-list of headers to capture, and allow users to configure this if they want to capture something specific:

newReplay({networkBreadcrumbs: {headers: ['My-Custom-Header']}}

The list could look like:

  • Content-Length
  • Content-Type
  • Accept

AWS specific headers:

  • X-Amzn-Trace-Id
  • More to add ??

Example breadcrumb:

{data: {url: 'my-url.com',method: 'GET',response: {headers: {'Accept': 'application'json','Authentication': '[redacted]'}}}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions