@bugsnag/browser-performance
Advanced tools
Comparing version 2.4.1 to 2.5.0
@@ -46,11 +46,11 @@ import { defaultNetworkRequestCallback } from '@bugsnag/request-tracker-performance'; | ||
} | ||
const span = this.spanFactory.startSpan(`[HTTP]/${startContext.method.toUpperCase()}`, { startTime: startContext.startTime, makeCurrentContext: false }); | ||
span.setAttribute('bugsnag.span.category', 'network'); | ||
span.setAttribute('http.method', startContext.method); | ||
span.setAttribute('http.url', networkRequestInfo.url); | ||
const span = this.spanFactory.startNetworkSpan({ | ||
method: startContext.method, | ||
startTime: startContext.startTime, | ||
url: networkRequestInfo.url | ||
}); | ||
return { | ||
onRequestEnd: (endContext) => { | ||
if (endContext.state === 'success') { | ||
span.setAttribute('http.status_code', endContext.status); | ||
this.spanFactory.endSpan(span, endContext.endTime); | ||
this.spanFactory.endSpan(span, endContext.endTime, { 'http.status_code': endContext.status }); | ||
} | ||
@@ -57,0 +57,0 @@ }, |
@@ -8,3 +8,3 @@ import cuid from '@bugsnag/cuid'; | ||
return function resourceAttributesSource(config) { | ||
const attributes = new ResourceAttributes(config.releaseStage, config.appVersion, 'bugsnag.performance.browser', '2.4.1'); | ||
const attributes = new ResourceAttributes(config.releaseStage, config.appVersion, 'bugsnag.performance.browser', '2.5.0'); | ||
attributes.set('browser.user_agent', navigator.userAgent); | ||
@@ -11,0 +11,0 @@ // chromium only |
@@ -1,2 +0,2 @@ | ||
import type { InternalConfiguration, Plugin, SpanFactory, SpanContextStorage } from '@bugsnag/core-performance'; | ||
import type { InternalConfiguration, Plugin, SpanContextStorage, SpanFactory } from '@bugsnag/core-performance'; | ||
import { type NetworkRequestInfo, type RequestTracker } from '@bugsnag/request-tracker-performance'; | ||
@@ -6,2 +6,6 @@ import { type BrowserConfiguration } from '../config'; | ||
readonly type: PerformanceResourceTiming['initiatorType']; | ||
/** | ||
* Experimental. Whether to propagate trace context by adding a `traceparent` header to the request. | ||
*/ | ||
propagateTraceContext?: boolean; | ||
} | ||
@@ -8,0 +12,0 @@ export declare class NetworkRequestPlugin implements Plugin<BrowserConfiguration> { |
{ | ||
"name": "@bugsnag/browser-performance", | ||
"version": "2.4.1", | ||
"version": "2.5.0", | ||
"description": "BugSnag performance monitoring for browsers", | ||
@@ -24,6 +24,6 @@ "homepage": "https://www.bugsnag.com/", | ||
"dependencies": { | ||
"@bugsnag/core-performance": "^2.4.1", | ||
"@bugsnag/cuid": "^3.1.0", | ||
"@bugsnag/delivery-fetch-performance": "^2.4.1", | ||
"@bugsnag/request-tracker-performance": "^2.4.1" | ||
"@bugsnag/core-performance": "^2.5.0", | ||
"@bugsnag/cuid": "^3.1.1", | ||
"@bugsnag/delivery-fetch-performance": "^2.5.0", | ||
"@bugsnag/request-tracker-performance": "^2.5.0" | ||
}, | ||
@@ -36,3 +36,3 @@ "type": "module", | ||
], | ||
"gitHead": "343b0fdbfb62caf28fafe258735f8032f8e00b4d" | ||
"gitHead": "e4097fdd6ade57d9643b4b1967f096697f8f2bb3" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82991
1390