Skip to content

Commit

Permalink
CLS: Add as a tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jarstelfox committed Jun 23, 2021
1 parent 741a3f1 commit 20979a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/tracing/src/browser/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ export class MetricsInstrumentation {

if (this._clsEntry) {
logger.log('[Measurements] Adding CLS Data');
transaction.setData('measurements.cls', {
sources: this._clsEntry.sources.map(source => htmlTreeAsString(source.node)),
});
this._clsEntry.sources.map((source, index) =>
transaction.setTag(`cls.source.${index + 1}`, htmlTreeAsString(source.node)),
);
}
}
}
Expand Down

0 comments on commit 20979a3

Please sign in to comment.