import { startSpan, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core'; const ORIGIN = "auto.faas.cloudflare.rate_limit"; function instrumentRateLimit(rateLimit, bindingName) { return new Proxy(rateLimit, { get(target, prop, receiver) { if (prop !== "limit") { return Reflect.get(target, prop, receiver); } const original = Reflect.get(target, prop, receiver); return function(options) { return startSpan( { name: `rate_limit ${bindingName}`, attributes: { [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN } }, () => Reflect.apply(original, target, [options]) ); }; } }); } export { instrumentRateLimit }; //# sourceMappingURL=instrumentRateLimit.js.map