From 398f148209122e0c5f115f320dd9b61adbb36c16 Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com> Date: Wed, 20 Nov 2024 13:33:29 +0100 Subject: [PATCH] chore: document network requests for rn (#9927) --- .../_snippets/react-native-network.mdx | 24 +++++++++++++++++++ .../docs/session-replay/network-recording.mdx | 4 ++++ 2 files changed, 28 insertions(+) diff --git a/contents/docs/session-replay/_snippets/react-native-network.mdx b/contents/docs/session-replay/_snippets/react-native-network.mdx index e69de29bb2d1..f1bdc3f4b5e6 100644 --- a/contents/docs/session-replay/_snippets/react-native-network.mdx +++ b/contents/docs/session-replay/_snippets/react-native-network.mdx @@ -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. \ No newline at end of file diff --git a/contents/docs/session-replay/network-recording.mdx b/contents/docs/session-replay/network-recording.mdx index 08192c2a1a53..67c3447add3e 100644 --- a/contents/docs/session-replay/network-recording.mdx +++ b/contents/docs/session-replay/network-recording.mdx @@ -19,6 +19,7 @@ Session replay allows you to capture network requests and responses, providing i Web Android iOS + React Native @@ -30,6 +31,9 @@ Session replay allows you to capture network requests and responses, providing i + + +