feat(browser): Add option to ignore mark and measure spans#16443
feat(browser): Add option to ignore mark and measure spans#16443
mark and measure spans#16443Conversation
size-limit report 📦
|
| * Default: [] | ||
| */ | ||
| ignoreResourceSpans: Array<string>; | ||
| ignoreResourceSpans: Array<'resouce.script' | 'resource.css' | 'resource.img' | 'resource.other' | string>; |
There was a problem hiding this comment.
yeah, realized we only made this addition in browsermetrics.ts rather than the user-facing option. Luckily not breaking :D
| * | ||
| * Default: [] - By default, all `mark` and `measure` entries are sent as spans. | ||
| */ | ||
| ignoreMeasureSpans: Array<string | RegExp>; |
There was a problem hiding this comment.
As this not only applies to the measure spans...should we call this ignorePerformanceAPISpans or ignoreWebPerformanceSpans? 🤔
No hard opinion on that though as my proposed name might be too wide in its description.
There was a problem hiding this comment.
I had exactly the same feeling. Let's make a decision fast, as I agree the name doesn't really include mark spans.
There was a problem hiding this comment.
And this is how we could extend this if people need granular options:
ignorePerformanceAPISpans: {
mark:
measure:
...
}There was a problem hiding this comment.
Renamed the option to ignorePerformanceApiSpans in ae2cfb0. Thanks for bringing this up!
ignorePerformanceApiSpansoption that matches span names ofmarkandmeasurespans to a given array or RegExpUsage:
closes #16441