bugsnag / bugsnag-js-performance

Monitor the performance of your JavaScript (web and React Native) and see the results in your BugSnag dashboard.
https://docs.bugsnag.com/performance/integration-guides
MIT License
5 stars 3 forks source link

use API key subdomain as default endpoint #500

Closed djskinner closed 2 months ago

djskinner commented 2 months ago

Goal

The SaaS span endpoint now supports the format .otlp.bugsnag.com This should just be the default value for the endpoint – if the developer passes their own URL we just use that value directly (don’t attempt to inject the API key into the provided URL).

Design

Mutate the configuration so that the actual value used is available to all consumers of the configuration, such as request instrumentations which use the value to determine which requests should be tracked or not, and what URLs to ignore in request settling.

Changeset

Testing

Note: e2e tests not added the depend on using a custom endpoint, which prevents us from testing this functionality at the e2e level

github-actions[bot] commented 2 months ago

Browser bundle size

NPM build

Package
Before 195.00 kB
After 196.15 kB
± +1,149 bytes ⚠️

CDN build

Unminified Minfied Minified + gzipped
Before 97.88 kB 36.29 kB 10.98 kB
After 98.89 kB 36.61 kB 11.07 kB
± +1,006 bytes ⚠️ +316 bytes ⚠️ +87 bytes ⚠️

Code coverage

Ok File (✨=New File) Lines Branches Functions Statements
/home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/core/lib/core.ts 100%
(+0%)
93.75%
(+0.42%)
92.85%
(+0%)
98.5%
(+0.09%)
🔴 /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/platforms/browser/lib/auto-instrumentation/route-change-plugin.ts 96%
(+0%)
75%
(+0%)
77.77%
(-9.73%)
96.15%
(+0%)

Total:

Lines Branches Functions Statements
87.92%(+0.04%) 79.03%(+0.09%) 89.19%(-0.17%) 86.01%(+0.05%)

Generated against 877c73b5c76bf751c9cb40b145928f1c1aa1046d on 4 September 2024 at 09:33:43 UTC