MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / safeDateNow

Function safeDateNow

packages/core/src/utils/randomSafeContext.ts:41–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39 * to ensure safe time value generation in certain contexts (e.g., Next.js Cache Components).
40 */
41export function safeDateNow(): number {
42 return withRandomSafeContext(() => Date.now());
43}

Callers 12

createSessionEnvelopeFunction · 0.90
createSpanEnvelopeFunction · 0.90
createCheckInEnvelopeFunction · 0.90
dateTimestampInSecondsFunction · 0.90
getBrowserTimeOriginFunction · 0.90
parseRetryAfterHeaderFunction · 0.90
isRateLimitedFunction · 0.90
updateRateLimitsFunction · 0.90
recordRequestSessionFunction · 0.90
flushInFunction · 0.90

Calls 2

withRandomSafeContextFunction · 0.85
nowMethod · 0.65

Tested by

no test coverage detected