-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Description
What
Use page.on('metric') for creating new name=value tags.
One way could be:
page.on('metric', m => {
if (activeTiming) {
m.tag({
tags: [{name: 'foo', value: 'bar'}],
matches: [{...url patterns to match...}],
});
}
});Why
We want to add new tags to group URLs.
Due to #2728, group doesn't work in an async way, and we're looking for a low-hanging fruit to provide support for URL grouping. The current page.on('metric') API only allows replacing the values of url and name tags, but not their names.
How
- We need to discuss whether this is doable.
- Adding a new field, such as
tags, can tell us whether to create a new tag. Iftagsexist, then, instead of replacing the values, we can add these new tags for the URLs that match the patterns specified inmatches.