-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(browser): Add option to ignore mark
and measure
spans
#16443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
size-limit report 📦
|
@@ -149,7 +149,22 @@ export interface BrowserTracingOptions { | |||
* | |||
* Default: [] | |||
*/ | |||
ignoreResourceSpans: Array<string>; | |||
ignoreResourceSpans: Array<'resouce.script' | 'resource.css' | 'resource.img' | 'resource.other' | string>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice type addition 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this is how we could extend this if people need granular options:
ignorePerformanceAPISpans: {
mark:
measure:
...
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed the option to ignorePerformanceApiSpans
in ae2cfb0. Thanks for bringing this up!
ignorePerformanceApiSpans
option that matches span names ofmark
andmeasure
spans to a given array or RegExpUsage:
closes #16441