-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
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 Browser CDN bundle
SDK Version
8.37.0
Framework Version
React 17.0.2
Link to Sentry event
Reproduction Example/SDK Setup
Sentry.init({
dsn: __SENTRY_DSN__,
enabled,
debug,
environment,
release,
tracesSampleRate: 1,
integrations: [
window.Sentry.breadcrumbsIntegration({
console: true,
dom: { serializeAttribute: ['data-testid', 'data-slot'] },
fetch: true,
history: true,
xhr: true,
}),
window.Sentry.browserTracingIntegration?.(),
window.Sentry.extraErrorDataIntegration?.(),
],
ignoreErrors: [
'CanceledError',
'ResizeObserver loop limit exceeded',
],
beforeSend(event, hint) {
const exception = event.exception?.values?.[0];
if (
exception &&
exception.type === 'UnhandledRejection' &&
exception.value === 'Object captured as promise rejection with keys: config, data, headers, request, status'
) {
// already reportd in other libraries
return null;
}
return event;
},
});
Steps to Reproduce
Just open the page. But I noticed a scenario that may trigger the problem: our project will trigger a react-router
change to add 2 queries immediately in the App
's useEffect
:
const history = useHistory();
history.push(`/current-path?query1=value1&query2=value2`);
Expected Result
FCP, LCP, and TTFB should be displayed correctly on the Web Vitals page.
Actual Result
They are missing, only an INP metric is displayed.
After some investigation, FCP, LCP and TTFB were generated, but for some reason, they aren't attached to the pageload
event, instead of a navigation
event.
Congee
Metadata
Metadata
Assignees
Projects
Status
Waiting for: Community