From e67b8bdcd5b764a6a78d859ab9c528abe61a932a Mon Sep 17 00:00:00 2001 From: Jarred Stelfox Date: Wed, 23 Jun 2021 11:23:12 -0700 Subject: [PATCH] CLS: Add as a tag See: https://github.com/getsentry/sentry-javascript/pull/3734\#discussion_r657311310 --- packages/tracing/src/browser/metrics.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/tracing/src/browser/metrics.ts b/packages/tracing/src/browser/metrics.ts index 0f137acc8b3a..0ec6aa175568 100644 --- a/packages/tracing/src/browser/metrics.ts +++ b/packages/tracing/src/browser/metrics.ts @@ -211,9 +211,7 @@ 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))); } } }