Skip to content

Commit e736ac6

Browse files
committed
refactor: ♻️ rename http version function
1 parent 9328042 commit e736ac6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/platforms/browser/lib/auto-instrumentation/resource-load-plugin.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ interface ResourceTiming extends PerformanceResourceTiming {
55
responseStatus?: number // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/responseStatus
66
}
77

8-
export function getHTTPFlavor (protocol: string) {
8+
export function getHttpVersion (protocol: string) {
99
switch (protocol) {
1010
case 'http/1.0':
1111
return '1.0'
@@ -46,8 +46,8 @@ export class ResourceLoadPlugin implements Plugin<BrowserConfiguration> {
4646

4747
for (const entry of entries) {
4848
if (entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest') {
49-
continue
50-
}
49+
continue
50+
}
5151

5252
const parentContext = this.spanContextStorage.first
5353

@@ -64,7 +64,7 @@ export class ResourceLoadPlugin implements Plugin<BrowserConfiguration> {
6464

6565
span.setAttribute('bugsnag.span.category', 'resource_load')
6666
span.setAttribute('http.url', entry.name)
67-
span.setAttribute('http.flavor', getHTTPFlavor(entry.nextHopProtocol))
67+
span.setAttribute('http.flavor', getHttpVersion(entry.nextHopProtocol))
6868

6969
if (entry.encodedBodySize && entry.decodedBodySize) {
7070
span.setAttribute('http.response_content_length', entry.encodedBodySize)

0 commit comments

Comments
 (0)