Skip to content

Session duration should be reported in seconds #3615

@rhcarvalho

Description

@rhcarvalho

Durations should be reported in seconds and are optional.

We're currently incorrectly computing and reporting durations in milliseconds.

Two changes required:

  1. Do not send duration for JS Browser sessions. The duration is not relevant at the moment as it doesn't represent anything users can relate to (for now it is essentially a page view, not any sort of long operation).
  2. For Node, fix duration calculation to report seconds instead of milliseconds and to use the same clock as we use for errors and transactions. See timestampInSeconds.
  3. For this PR, revert the above changes to packages/hub/src/session.ts and merge the changes to packages/browser/src/sdk.ts.

Originally posted by @rhcarvalho in #3608 (comment)

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions