-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
- Review the documentation: https://docs.sentry.io/
- Search for existing issues: https://github.com/getsentry/sentry-javascript/issues
- Use the latest release: https://github.com/getsentry/sentry-javascript/releases
Package + Version
@sentry/[email protected]
Description
raven-js automatically included the extra session:duration with every capture. @sentry/browser appears to be lacking this extra - I couldn't find any reference in the code to this outside the the raven-js codebase. Was this an intentional decision or would you consider this a regression?
(It's not hard to manually re-add though)
const startTime = new Date()
Sentry.init({
...,
beforeSend(event, hint) {
event.extra = event.extra || {}
event.extra['session:duration'] = new Date() - startTime
return event
}
})