Skip to content

Commit b636963

Browse files
authored
ref(browser): Update browser metrics to avoid deprecations (#10943)
This rewrites browser metrics to: 1. Accept spans instead of transactions 2. Use the new performance APIs instead of the old ones The only thing I left for now is the tags, which we can get rid of separately: #10823 Part of #10900
1 parent ebbdc8e commit b636963

File tree

5 files changed

+321
-196
lines changed

5 files changed

+321
-196
lines changed

packages/core/src/tracing/sentrySpan.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,18 @@ export class SentrySpan implements Span {
371371
Object.keys(attributes).forEach(key => this.setAttribute(key, attributes[key]));
372372
}
373373

374+
/**
375+
* This should generally not be used,
376+
* but we need it for browser tracing where we want to adjust the start time afterwards.
377+
* USE THIS WITH CAUTION!
378+
*
379+
* @hidden
380+
* @internal
381+
*/
382+
public updateStartTime(timeInput: SpanTimeInput): void {
383+
this._startTime = spanTimeInputToSeconds(timeInput);
384+
}
385+
374386
/**
375387
* @inheritDoc
376388
*/

0 commit comments

Comments
 (0)