Open
Description
Environment
- Runtime: AWS Lambda
- SDK: @sentry/node v8.2.0
- Node.js: v18.x
- Region: us-west-2
Problem
When using SENTRY_RELEASE
in combination with manual captureException()
, the event.timestamp
is sometimes skewed by several seconds (occasionally even into the future).
This leads to misordered events in the Sentry UI timeline and impacts alerting thresholds.
Steps to Reproduce
- Deploy a Lambda with
SENTRY_RELEASE
set via env. - Trigger manual
captureException()
during cold start. - Observe event timestamps.
Expected Result
Accurate event.timestamp
aligned with actual execution time.
Actual Result
Timestamp offset (e.g. future-dated by 2–4s).
Notes
Seems related to lazy initialization of release context in async environments. May benefit from await Sentry.flush()
or lazy-load guards.
Metadata
Metadata
Assignees
Type
Projects
Status
Waiting for: Product Owner