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

Function isRateLimited

packages/core/src/utils/ratelimit.ts:44–46  ·  view source on GitHub ↗
(limits: RateLimits, dataCategory: DataCategory, now: number = safeDateNow())

Source from the content-addressed store, hash-verified

42 * Checks if a category is rate limited
43 */
44export function isRateLimited(limits: RateLimits, dataCategory: DataCategory, now: number = safeDateNow()): boolean {
45 return disabledUntil(limits, dataCategory) > now;
46}
47
48/**
49 * Update ratelimits from incoming headers.

Callers 4

ratelimit.test.tsFile · 0.90
sendFunction · 0.90
sendReplayRequestFunction · 0.90
sendBlockEventFunction · 0.85

Calls 2

safeDateNowFunction · 0.90
disabledUntilFunction · 0.85

Tested by

no test coverage detected