Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

chore: link session url with sentry alert (#10566)

Ashwin Bhatkal47daba3c17be
diff --git a/frontend/src/AppRoutes/index.tsx b/frontend/src/AppRoutes/index.tsx
index 7e89460215..faa451d0cf 100644
--- a/frontend/src/AppRoutes/index.tsx
+++ b/frontend/src/AppRoutes/index.tsx
@@ -321,6 +321,19 @@ function App(): JSX.Element {
// Session Replay
replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
+ beforeSend(event) {
+ const sessionReplayUrl = posthog.get_session_replay_url?.({
+ withTimestamp: true,
+ });
+ if (sessionReplayUrl) {
+ // eslint-disable-next-line no-param-reassign
+ event.contexts = {
+ ...event.contexts,
+ posthog: { session_replay_url: sessionReplayUrl },
+ };
+ }
+ return event;
+ },
});
setIsSentryInitialized(true);