From 5823ee7e66c56cbbb77a2af7e6519aca1992f4fa Mon Sep 17 00:00:00 2001 From: Kev <6111995+k-fish@users.noreply.github.com> Date: Tue, 11 Jul 2023 11:14:53 -0400 Subject: [PATCH] Also add protocol to disambiguate SPDY --- packages/tracing-internal/src/browser/request.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/tracing-internal/src/browser/request.ts b/packages/tracing-internal/src/browser/request.ts index 00c7011fe16b..d2c16e74059c 100644 --- a/packages/tracing-internal/src/browser/request.ts +++ b/packages/tracing-internal/src/browser/request.ts @@ -183,12 +183,12 @@ function addHTTPTimings(span: Span): void { } function resourceTimingEntryToSpanData(resourceTiming: PerformanceResourceTiming): [string, string | number][] { + const name = resourceTiming.nextHopProtocol.split('/')[0].toLowerCase() || (resourceTiming.nextHopProtocol.startsWith('h') && 'http') || 'unknown'; const version = resourceTiming.nextHopProtocol.split('/')[1] || resourceTiming.nextHopProtocol.split('h')[1] || 'unknown'; const timingSpanData: [string, string | number][] = []; - if (version) { - timingSpanData.push(['network.protocol.version', version]); - } + + timingSpanData.push(['network.protocol.version', version], ['network.protocol.name', name]); if (!browserPerformanceTimeOrigin) { return timingSpanData;