-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Package: reactIssues related to the Sentry React SDKIssues related to the Sentry React SDKPackage: replayIssues related to the Sentry Replay SDKIssues related to the Sentry Replay SDK
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/react
SDK Version
8.2.1
Framework Version
No response
Link to Sentry event
No response
SDK Setup
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import * as Sentry from "@sentry/react";
import * as DOM from 'react-router-dom';
Sentry.init({
dsn: "DSN_HERE",
integrations: [
// See docs for support of different versions of variation of react router
// https://docs.sentry.io/platforms/javascript/guides/react/configuration/integrations/react-router/
Sentry.reactRouterV6BrowserTracingIntegration({
useEffect: React.useEffect,
useLocation: DOM.useLocation,
useNavigationType: DOM.useNavigationType,
createRoutesFromChildren: DOM.createRoutesFromChildren,
matchRoutes: DOM.matchRoutes
}),
Sentry.replayIntegration()
],
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
tracesSampleRate: 1.0,
// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
});
Steps to Reproduce
<button
type="button"
onClick={() => {
Sentry.addBreadcrumb({
"type": "default",
"category": "started",
"data": undefined,
"level": "info",
"message": "this is a message",
});
throw new Error('Sentry Test Error');
}}
>
Break the world
</button>
Expected Result
The breadcrumb shows up both in the issue and in the replay.
Actual Result
The breadcrumb shows up only in the issue and not in the replay.
Here is the event for reference.
Metadata
Metadata
Assignees
Labels
Package: reactIssues related to the Sentry React SDKIssues related to the Sentry React SDKPackage: replayIssues related to the Sentry Replay SDKIssues related to the Sentry Replay SDK
Projects
Status
Waiting for: Product Owner