Real User Monitoring (RUM) supports reporting application data through Sentry SDKs. If you already use Sentry for error tracking and performance monitoring, you can write your data to Alibaba Cloud and analyze it in the RUM console. This topic describes the scenarios, benefits, and architecture of the Sentry SDK integration solution.
Scenarios
The Sentry SDK integration solution is suitable for the following scenarios:
Scenario | Description |
New user integration | Use Sentry SDKs to collect application data and leverage the data analytics capabilities of Alibaba Cloud RUM. |
Migration from self-hosted Sentry | Migrate data storage from a self-hosted Sentry service to Alibaba Cloud to reduce O&M costs. |
Dual-platform observation | Use both the Sentry console and the Alibaba Cloud RUM console for data analytics. |
Benefits
Reduced O&M costs
Self-hosted Sentry services require maintaining over 70 container services, including components such as Kafka, ClickHouse, and Snuba. With this solution, Alibaba Cloud manages core data storage and message processing, which significantly reduces your O&M workload.
High availability
The data storage path is hosted on Alibaba Cloud Simple Log Service (SLS), which provides a highly available and reliable service.
Smooth migration
The solution supports Nginx traffic mirroring in dual-write mode. This lets you gradually synchronize data to Alibaba Cloud without interrupting your existing Sentry service.
Unified dual-platform observation
Developer teams can continue to use the Sentry console for error troubleshooting.
O&M teams can perform unified monitoring and configure alerts in the Alibaba Cloud RUM console.
Overall architecture
This solution uses SLS as a unified data backend, supporting data queries from both the Sentry console and the Alibaba Cloud RUM console.
Data ingest path
Write Mode | Description | Scenario |
Direct write from SDK | Modify the DSN configuration of the Sentry SDK to report data directly to SLS. | New user integration and existing users after migration. |
Nginx dual-write | Use Nginx traffic mirroring to send data to both the original Sentry service and SLS simultaneously. | During the migration transition period when data integrity validation is required. |
Data read path
Read method | Description |
RUM console | Data is automatically transformed into the standard RUM format during ingest and can be viewed directly in the console. |
Sentry console | Deploy custom Sentry Web and Snuba API containers to read data from SLS. |
Limits
Restrictions | Description |
Data format | Only the Sentry Envelope protocol format is supported. The legacy Store protocol is not supported. |
Sentry SDK version | Use an SDK version that supports the Envelope protocol. For specific requirements, see the table below. |
Reading from the Sentry console | Requires deployment of custom containers. The native Sentry service cannot read data directly from SLS. |
Data retention | The default data retention period is 30 days. |
SDK version requirements
This solution only supports data reporting in the Sentry Envelope protocol format. The minimum SDK version requirements for each platform are as follows:
SDK | Minimum version | Description |
@sentry/vue | 7.0.0 | JavaScript SDK v7 and later support only the Envelope format. |
@sentry/browser | 7.0.0 | JavaScript SDK v7 and later support only the Envelope format. |
@sentry/react | 7.0.0 | JavaScript SDK v7 and later support only the Envelope format. |
@sentry/node | 7.0.0 | JavaScript SDK v7 and later support only the Envelope format. |
@sentry/electron | 4.0.0 | Depends on JavaScript SDK v7. |
sentry-java (Android) | 3.0.0 | v3.0.0 and later support the Envelope format. |
sentry-cocoa (iOS/macOS) | 6.0.0 | v6.0.0 and later support the Envelope format. |
Note If your current SDK version is earlier than the required version, upgrade the SDK before integration.
What to do next
After you understand the solution, follow these steps to integrate:
Configure Sentry SDK data ingest: Report Sentry SDK data to Alibaba Cloud.
Configure the Sentry console to read RUM data (Optional): Deploy custom containers to view data in the Sentry interface.