Skip to content

session:duration gone in @sentry/browser (vs raven-js) #1823

@mogelbrod

Description

@mogelbrod

Package + Version

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
  }
})

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions