diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/http-timings/test.ts b/packages/browser-integration-tests/suites/tracing/browsertracing/http-timings/test.ts index c4b5d3e92e62..566c14297897 100644 --- a/packages/browser-integration-tests/suites/tracing/browsertracing/http-timings/test.ts +++ b/packages/browser-integration-tests/suites/tracing/browsertracing/http-timings/test.ts @@ -40,9 +40,16 @@ sentryTest('should create fetch spans with http timing', async ({ browserName, g timestamp: expect.any(Number), trace_id: tracingEvent.contexts?.trace?.trace_id, data: expect.objectContaining({ + 'http.request.redirect_start': expect.any(Number), + 'http.request.fetch_start': expect.any(Number), + 'http.request.domain_lookup_start': expect.any(Number), + 'http.request.domain_lookup_end': expect.any(Number), 'http.request.connect_start': expect.any(Number), + 'http.request.secure_connection_start': expect.any(Number), + 'http.request.connection_end': expect.any(Number), 'http.request.request_start': expect.any(Number), 'http.request.response_start': expect.any(Number), + 'http.request.response_end': expect.any(Number), 'network.protocol.version': expect.any(String), }), }), diff --git a/packages/tracing-internal/src/browser/request.ts b/packages/tracing-internal/src/browser/request.ts index 071b2146bb16..28efe77d4b99 100644 --- a/packages/tracing-internal/src/browser/request.ts +++ b/packages/tracing-internal/src/browser/request.ts @@ -195,9 +195,16 @@ function resourceTimingEntryToSpanData(resourceTiming: PerformanceResourceTiming } return [ ...timingSpanData, - ['http.request.connect_start', (browserPerformanceTimeOrigin + resourceTiming.connectStart) / 1000], - ['http.request.request_start', (browserPerformanceTimeOrigin + resourceTiming.requestStart) / 1000], - ['http.request.response_start', (browserPerformanceTimeOrigin + resourceTiming.responseStart) / 1000], + ['http.request.redirect_start', resourceTiming.redirectStart], + ['http.request.fetch_start', resourceTiming.fetchStart], + ['http.request.domain_lookup_start', resourceTiming.domainLookupStart], + ['http.request.domain_lookup_end', resourceTiming.domainLookupEnd], + ['http.request.connect_start', resourceTiming.connectStart], + ['http.request.secure_connection_start', resourceTiming.secureConnectionStart], + ['http.request.connection_end', resourceTiming.connectEnd], + ['http.request.request_start', resourceTiming.requestStart], + ['http.request.response_start', resourceTiming.responseStart], + ['http.request.response_end', resourceTiming.responseEnd], ]; }