Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to configure callback for replay network body handling #7882

Closed
mydea opened this issue Apr 17, 2023 · 4 comments
Closed

Allow to configure callback for replay network body handling #7882

mydea opened this issue Apr 17, 2023 · 4 comments

Comments

@mydea
Copy link
Member

mydea commented Apr 17, 2023

We may want to add a callback configuration option for replay, that allows users to manually strip stuff from network bodies client side.

An example API could be:

new Replay({
  network: {
    urls: ['https://my-domain.com'],
    requestBodyCallback: (body: unknown) => unknown,
    responseBodyCallback: (body: unknown) => unknown,
  }
})
@bruno-garcia
Copy link
Member

Having the actual URL and header as arguments would also help folks know what to do (drop, etc)

@mydea
Copy link
Member Author

mydea commented May 4, 2023

Having the actual URL and header as arguments would also help folks know what to do (drop, etc)

Yes, we should def. put more info in there! maybe we can pass the breadcrumb (or part of it) somehow. One question would be, if we should pass this before or after truncation. after would be easier, and already potential JSON.parsed, if we do it before we can only pass the string as is.

@billyvg
Copy link
Member

billyvg commented Jun 1, 2023

This can be solved by #8124?

@mydea
Copy link
Member Author

mydea commented Jun 1, 2023

Yes, indeed! 👍

@mydea mydea closed this as completed Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants