-
Notifications
You must be signed in to change notification settings - Fork 129
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
feat: capture network payloads (internal alpha) #886
Conversation
Size Change: +12.9 kB (+2%) Total Size: 732 kB
ℹ️ View Unchanged
|
import { getRecordNetworkPlugin } from './network/record' | ||
import { buildNetworkRequestOptions } from './network/record/default-options' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move all of this stuff (aside from maybe some types) into the recorder loader?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great and is very exciting.
Only thing I'm wondering is if we sadly need an additional remote config flag for this, otherwise we will immediately start capturing request and response data for all existing people who have perf enabled...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets goooo
rrweb has network payloads queued up as a feature... but it's taking a while.
The easiest way to test it is to adopt it ourselves.
This adds a copy of the plugin proposed for rrweb, and uses it to wrap xhr and fetch.
We can match performance timings and these new
NetworkRequest
s based on URL and timingsused by PostHog/posthog#18562
for now this can only be enabled via decide response, which allows header and body capture to be configured separately
TODO