rrweb icon indicating copy to clipboard operation
rrweb copied to clipboard

[Feature Request]: Setting name as data.payload.name instead of data.tag

Open Archish27 opened this issue 1 year ago • 0 comments

Preflight Checklist

  • [X] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

What package is this feature request for?

rrweb

Problem Description

Idea is to have two multiple custom names under same tag.

Example: tag name as error & event name as Some error occurred in application

Why what is the idea behind this? Currently there is no way to group event names under same tag. By doing so we can define same color to specific tag.

Proposed Solution

instead of this

const customEvent = {
          name: event.data.tag,
          background: tags[event.data.tag] || 'rgb(73, 80, 246)',
          position: `${position(start, end, event.timestamp)}%`,
        };
customEvents.push(customEvent);

to

const customEvent = {
          name: event.data.name,
          background: tags[event.data.tag] || 'rgb(73, 80, 246)',
          position: `${position(start, end, event.timestamp)}%`,
 };
customEvents.push(customEvent);

Alternatives Considered

N/A

Additional Information

No response

Archish27 avatar Mar 14 '24 12:03 Archish27