Skip to content

Commit

Permalink
fix: do not capture entire elements in web vitals (#1483)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra authored Oct 18, 2024
1 parent 144d9f4 commit d01ad73
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/extensions/web-vitals/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,14 @@ export class WebVitalsAutocapture {
? Date.now()
: this.buffer.firstMetricTimestamp

if (metric.attribution && metric.attribution.interactionTargetElement) {
// we don't want to send the entire element
// they can be very large
// TODO we could run this through autocapture code so that we get elements chain info
// and can display the element in the UI
metric.attribution.interactionTargetElement = undefined
}

this.buffer.metrics.push({
...metric,
$current_url: $currentUrl,
Expand Down

0 comments on commit d01ad73

Please sign in to comment.