Skip to content

Commit

Permalink
chore: document network requests for rn (#9927)
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto authored Nov 20, 2024
1 parent c6778fe commit 398f148
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
24 changes: 24 additions & 0 deletions contents/docs/session-replay/_snippets/react-native-network.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
To capture network requests in your recordings, add `captureNetworkTelemetry: true` to your PostHog Session replay configuration alongside any of your other configuration options:

> **Note:** Capture network requests is only available for iOS.
```js
export const posthog = new PostHog(
'apiKey',
{
// Enable session recording. Requires enabling in your project settings as well.
// Default is false.
enableSessionReplay: true,
sessionReplayConfig: {
// Whether network requests are captured in recordings. Default is true
// Only metric-like data like speed, size, and response code are captured.
// No data is captured from the request or response body.
// iOS only
captureNetworkTelemetry: true,
...
},
},
);
```

> **Note:** Only metric-like data like speed, size, and response code are captured. No data is captured from the request or response body.
4 changes: 4 additions & 0 deletions contents/docs/session-replay/network-recording.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Session replay allows you to capture network requests and responses, providing i
<Tab>Web</Tab>
<Tab>Android</Tab>
<Tab>iOS</Tab>
<Tab>React Native</Tab>
</Tab.List>
<Tab.Panels>
<Tab.Panel>
Expand All @@ -30,6 +31,9 @@ Session replay allows you to capture network requests and responses, providing i
<Tab.Panel>
<IOSNetwork />
</Tab.Panel>
<Tab.Panel>
<ReactNativeNetwork />
</Tab.Panel>
</Tab.Panels>
</Tab.Group>

Expand Down

0 comments on commit 398f148

Please sign in to comment.