We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03f1836 commit fab4914Copy full SHA for fab4914
library/agent/Context.ts
@@ -86,9 +86,10 @@ export function runWithContext<T>(context: Context, fn: () => T) {
86
return fn();
87
}
88
89
- // Reset the context
90
- // We should copy the context to avoid modifying the original object
91
- // For performance reasons, we don't copy the cache
+ // `attackDetected`, `consumedRateLimitForIP` and `consumedRateLimitForUser`
+ // are carried over if there's an existing context
+ // Only in case of a top level context, we should reset them first
92
+ // This is more for tests than for real usage
93
delete context.cache;
94
delete context.attackDetected;
95
delete context.consumedRateLimitForIP;
0 commit comments