Skip to content

Allow page.on('metric') to create new tags #5356

@inancgumus

Description

@inancgumus

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. If tags exist, then, instead of replacing the values, we can add these new tags for the URLs that match the patterns specified in matches.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions