File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/browser/src/tracing Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import {
2828 stringMatchesSomePattern ,
2929 stripDataUrlContent ,
3030 stripUrlQueryAndFragment ,
31+ timestampInSeconds ,
3132} from '@sentry/core' ;
3233import type { XhrHint } from '@sentry-internal/browser-utils' ;
3334import {
@@ -269,11 +270,10 @@ function addHTTPTimings(span: Span, client: Client): void {
269270 // either receive the timing data, or HTTP_TIMING_WAIT_MS elapses.
270271 if ( hasSpanStreamingEnabled ( client ) ) {
271272 const originalEnd = span . end . bind ( span ) ;
272- let capturedEndTimestamp : SpanTimeInput | undefined ;
273- let isEnded = false ;
274273
275274 span . end = ( endTimestamp ?: SpanTimeInput ) => {
276- capturedEndTimestamp = endTimestamp ;
275+ const capturedEndTimestamp = endTimestamp || timestampInSeconds ( ) ;
276+ let isEnded = false ;
277277
278278 const endSpanAndCleanup = ( ) : void => {
279279 if ( isEnded ) {
You can’t perform that action at this time.
0 commit comments