Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bugsnag/browser-performance

Package Overview
Dependencies
Maintainers
9
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bugsnag/browser-performance - npm Package Compare versions

Comparing version 2.8.0 to 2.8.1-alpha.0

6

dist/auto-instrumentation/network-request-plugin.js

@@ -0,1 +1,2 @@

import { traceIdToSamplingRate } from '@bugsnag/core-performance';
import { defaultNetworkRequestCallback } from '@bugsnag/request-tracker-performance';

@@ -83,2 +84,3 @@

extraRequestHeaders.traceparent = buildTraceparentHeader(traceId, parentSpanId, sampled);
extraRequestHeaders.tracestate = buildTracestateHeader(traceId);
}

@@ -91,2 +93,3 @@ else if (this.spanContextStorage.current) {

extraRequestHeaders.traceparent = buildTraceparentHeader(traceId, parentSpanId, sampled);
extraRequestHeaders.tracestate = buildTracestateHeader(traceId);
}

@@ -99,3 +102,6 @@ return extraRequestHeaders;

}
function buildTracestateHeader(traceId) {
return `sb=v:1;r:${traceIdToSamplingRate(traceId)}`;
}
export { NetworkRequestPlugin };

5

dist/auto-instrumentation/route-change-plugin.js

@@ -51,3 +51,6 @@ import { isObject, isString, coreSpanOptionSchema } from '@bugsnag/core-performance';

// create internal options for validation
const routeChangeSpanOptions = Object.assign(Object.assign({}, options), { trigger });
const routeChangeSpanOptions = {
...options,
trigger
};
const cleanOptions = this.spanFactory.validateSpanOptions('[RouteChange]', routeChangeSpanOptions, routeChangeSpanOptionSchema);

@@ -54,0 +57,0 @@ const route = configuration.routingProvider.resolveRoute(absoluteUrl) || defaultRouteResolver(absoluteUrl);

35

dist/config.js

@@ -7,41 +7,56 @@ import { schema, isBoolean, isStringOrRegExpArray, isStringWithLength } from '@bugsnag/core-performance';

function createSchema(hostname, defaultRoutingProvider) {
return Object.assign(Object.assign({}, schema), { releaseStage: Object.assign(Object.assign({}, schema.releaseStage), { defaultValue: hostname === 'localhost' ? 'development' : 'production' }), autoInstrumentFullPageLoads: {
return {
...schema,
releaseStage: {
...schema.releaseStage,
defaultValue: hostname === 'localhost' ? 'development' : 'production'
},
autoInstrumentFullPageLoads: {
defaultValue: true,
message: 'should be true|false',
validate: isBoolean
}, autoInstrumentNetworkRequests: {
},
autoInstrumentNetworkRequests: {
defaultValue: true,
message: 'should be true|false',
validate: isBoolean
}, autoInstrumentRouteChanges: {
},
autoInstrumentRouteChanges: {
defaultValue: true,
message: 'should be true|false',
validate: isBoolean
}, generateAnonymousId: {
},
generateAnonymousId: {
defaultValue: true,
message: 'should be true|false',
validate: isBoolean
}, routingProvider: {
},
routingProvider: {
defaultValue: defaultRoutingProvider,
message: 'should be a routing provider',
validate: isRoutingProvider
}, settleIgnoreUrls: {
},
settleIgnoreUrls: {
defaultValue: [],
message: 'should be an array of string|RegExp',
validate: isStringOrRegExpArray
}, networkRequestCallback: {
},
networkRequestCallback: {
defaultValue: defaultNetworkRequestCallback,
message: 'should be a function',
validate: isNetworkRequestCallback
}, sendPageAttributes: {
},
sendPageAttributes: {
defaultValue: defaultSendPageAttributes,
message: 'should be an object',
validate: isSendPageAttributes
}, serviceName: {
},
serviceName: {
defaultValue: 'unknown_service',
message: 'should be a string',
validate: isStringWithLength
} });
}
};
}
export { createSchema };

@@ -8,3 +8,3 @@ import cuid from '@bugsnag/cuid';

return function resourceAttributesSource(config) {
const attributes = new ResourceAttributes(config.releaseStage, config.appVersion, config.serviceName, 'bugsnag.performance.browser', '2.8.0');
const attributes = new ResourceAttributes(config.releaseStage, config.appVersion, config.serviceName, 'bugsnag.performance.browser', '2.8.1-alpha.0');
attributes.set('browser.user_agent', navigator.userAgent);

@@ -11,0 +11,0 @@ // chromium only

@@ -9,3 +9,6 @@ import { isObject } from '@bugsnag/core-performance';

function getPermittedAttributes(sendPageAttributes) {
return Object.assign(Object.assign({}, defaultSendPageAttributes), sendPageAttributes);
return {
...defaultSendPageAttributes,
...sendPageAttributes
};
}

@@ -12,0 +15,0 @@ function isSendPageAttributes(obj) {

{
"name": "@bugsnag/browser-performance",
"version": "2.8.0",
"version": "2.8.1-alpha.0",
"description": "BugSnag performance monitoring for browsers",

@@ -24,9 +24,9 @@ "homepage": "https://www.bugsnag.com/",

"dependencies": {
"@bugsnag/core-performance": "^2.8.0",
"@bugsnag/core-performance": "^2.8.1-alpha.0",
"@bugsnag/cuid": "^3.1.1",
"@bugsnag/delivery-fetch-performance": "^2.8.0",
"@bugsnag/request-tracker-performance": "^2.8.0"
"@bugsnag/delivery-fetch-performance": "^2.8.1-alpha.0",
"@bugsnag/request-tracker-performance": "^2.8.1-alpha.0"
},
"devDependencies": {
"@bugsnag/browser": "^7.25.0-alpha.0"
"@bugsnag/browser": "8.0.0-alpha.13"
},

@@ -39,3 +39,3 @@ "type": "module",

],
"gitHead": "39754ecb88063ec84edb031202820545950725de"
"gitHead": "904470ce3230f19ce28f858efe5cf6b0f18cecf1"
}

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc