Self-hosting session replay documentation#1361
Self-hosting session replay documentation#1361stevenchien-amplitude wants to merge 3 commits intomainfrom
Conversation
- Created new documentation page covering how to self-host Session Replay - Explains SDK configuration options (trackServerUrl, configServerUrl) - Provides proxy setup guides for AWS CloudFront, Nginx, and Node.js - Includes API endpoint reference for US and EU data centers - Added troubleshooting section for common proxy issues - Positioned in navigation after Heatmaps section Co-authored-by: steven.chien <steven.chien@amplitude.com>
|
Cursor Agent can help with this pull request. Just |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| | Option | Type | Description | | ||
| | ------ | ---- | ----------- | | ||
| | `trackServerUrl` | `string` | The URL where the SDK sends replay data. This overrides the default data ingestion endpoint. | | ||
| | `configServerUrl` | `string` | The URL where the SDK fetches remote configuration. This overrides the default configuration endpoint. | |
There was a problem hiding this comment.
we also need serverUrl for the plugin (standalone doesn't talk to event server so doesn't need it) to relay data sent to Amplitude event server
| }); | ||
|
|
||
| amplitude.add(sessionReplayTracking); | ||
| amplitude.init(API_KEY); |
There was a problem hiding this comment.
iirc, serverUrl should go into this init() function.
| deviceId: DEVICE_ID, | ||
| sessionId: SESSION_ID, | ||
| serverUrl: "https://your-proxy.example.com", | ||
| sampleRate: 0.1) |
There was a problem hiding this comment.
there probably should be 3 url overrides too. Please check with SDK team on url override options.
|
|
||
| Your proxy server must forward requests to the appropriate Amplitude endpoints based on your data center region. | ||
|
|
||
| ### Data ingestion endpoints |
There was a problem hiding this comment.
Maybe use something like (Session Replay) Data ingestion endpoints to distinguish from Amplitude event ingestion
| | Region | Endpoint | | ||
| | ------ | -------- | | ||
| | US (default) | `https://sr-client-cfg.amplitude.com/config` | | ||
| | EU | `https://sr-client-cfg.eu.amplitude.com/config` | |
There was a problem hiding this comment.
Plus Amplitude event ingestion endpoints
There was a problem hiding this comment.
The latest endpoint put API key in the URL, for example:
https://sr-client-cfg.amplitude.com/config/API_KEY_XXXXXXXXX
Not sure if there's way to configure it in proxies but it's preferred to use the latest endpoint
Add documentation for self-hosting the Session Replay SDK, detailing proxy configurations to address data residency, ad blocker bypass, and security policy needs.
Slack Thread