@bugsnag/browser-performance
Advanced tools
Comparing version 1.0.0 to 1.1.0
import { getPermittedAttributes } from '../send-page-attributes.js'; | ||
import { instrumentPageLoadPhaseSpans } from './page-load-phase-spans.js'; | ||
import { defaultRouteResolver } from '../default-routing-provider.js'; | ||
@@ -33,3 +34,6 @@ class FullPageLoadPlugin { | ||
return; | ||
const route = configuration.routingProvider.resolveRoute(url); | ||
// ensure there's always a route on this span by falling back to the | ||
// default route resolver - the pipeline will ignore page load spans that | ||
// don't have a route | ||
const route = configuration.routingProvider.resolveRoute(url) || defaultRouteResolver(url); | ||
span.name += route; | ||
@@ -36,0 +40,0 @@ instrumentPageLoadPhaseSpans(this.spanFactory, this.performance, route, span); |
@@ -26,2 +26,3 @@ import { responseStateFromStatusCode } from '@bugsnag/core-performance'; | ||
async send(payload) { | ||
const body = JSON.stringify(payload.body); | ||
payload.headers['Bugsnag-Sent-At'] = clock.date().toISOString(); | ||
@@ -32,3 +33,3 @@ try { | ||
keepalive, | ||
body: JSON.stringify(payload.body), | ||
body, | ||
headers: payload.headers | ||
@@ -42,2 +43,5 @@ }); | ||
catch (err) { | ||
if (body.length > 10e5) { | ||
return { state: 'failure-discard' }; | ||
} | ||
return { state: 'failure-retryable' }; | ||
@@ -44,0 +48,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', '1.0.0'); | ||
const attributes = new ResourceAttributes(config.releaseStage, config.appVersion, 'bugsnag.performance.browser', '1.1.0'); | ||
attributes.set('browser.user_agent', navigator.userAgent); | ||
@@ -11,0 +11,0 @@ // chromium only |
export { DefaultRoutingProvider, default, onSettle } from './browser'; | ||
export { type BrowserConfiguration } from './config'; | ||
export { type RouteResolver, type RoutingProvider } from './routing-provider'; | ||
export { type RouteResolver, type RoutingProvider, type StartRouteChangeCallback } from './routing-provider'; | ||
export { type SpanOptions, type Time } from '@bugsnag/core-performance'; | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "@bugsnag/browser-performance", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "BugSnag performance monitoring for browsers", | ||
@@ -24,3 +24,3 @@ "homepage": "https://www.bugsnag.com/", | ||
"dependencies": { | ||
"@bugsnag/core-performance": "^1.0.0", | ||
"@bugsnag/core-performance": "^1.1.0", | ||
"@bugsnag/cuid": "^3.0.2" | ||
@@ -34,3 +34,3 @@ }, | ||
], | ||
"gitHead": "d30abd6e95ef5fe79582fd63186e243aa40269de" | ||
"gitHead": "eb9c74ef7ee136eb46a16922db4013024cb0dbb0" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
87975
1485
2