GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||
GeezerVison is showing github.com — feat(cloudflare): Add cloudflare sdk scaffolding by AbhiPrasad · Pull Request #12953 · getsentry/sentry-javascript Conversation
|
| const cachedDecision = _headersUrlMap.get(url); | ||
| if (cachedDecision !== undefined) { | ||
| return cachedDecision; | ||
| } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
l: could extract the cache decision logic into a helper function and reuse it in _shouldCreateSpan
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Will do this in a follow-up PR
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| const shouldCreateSpanForRequest = options.shouldCreateSpanForRequest; | ||
|
|
||
| const _createSpanUrlMap = new LRUMap<string, boolean>(100); | ||
| const _headersUrlMap = new LRUMap<string, boolean>(100); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Just to understand it better, how did you come up with cache size 100?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This was arbitrary, it matches the implementation for vercel-edge fetch integration. We can always adjust this in the future.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.