Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugsnag-js v8 #2011

Merged
merged 272 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
272 commits
Select commit Hold shift + click to select a range
e5cc511
increase step timeout
gingerbenw Oct 17, 2022
58f59a4
Merge remote-tracking branch 'origin/integration/v8' into PLAT-8023-h…
gingerbenw Oct 17, 2022
cabdc03
revert timeout increase
gingerbenw Oct 17, 2022
3ba4e3b
increase install timeout to 5 minutes
gingerbenw Oct 18, 2022
561f3d2
fix timeout increase
gingerbenw Oct 18, 2022
5e8498a
Merge remote-tracking branch 'origin/next' into integration/v8
gingerbenw Oct 20, 2022
4e1f6ec
Merge remote-tracking branch 'origin/integration/v8' into PLAT-8023-h…
gingerbenw Oct 20, 2022
e4304cb
Merge pull request #1831 from bugsnag/PLAT-8023-handle-incomplete-config
gingerbenw Oct 20, 2022
30d8a28
perf: :zap: run client._notify in zone when available
gingerbenw Nov 4, 2022
ae536e2
update CHANGELOG.md
gingerbenw Nov 4, 2022
c4bca92
Merge remote-tracking branch 'origin/next' into PLAT-6697-perf-change…
gingerbenw Nov 4, 2022
adb444a
Apply suggestions from code review
gingerbenw Nov 7, 2022
586f852
Merge remote-tracking branch 'origin/next' into integration/v8
gingerbenw Nov 7, 2022
10ed91d
Merge branch 'integration/v8' into PLAT-6697-perf-change-detection
gingerbenw Nov 7, 2022
f21e295
Update packages/plugin-angular/src/index.ts
gingerbenw Nov 8, 2022
1aed6b5
Merge remote-tracking branch 'origin/next' into integration/v8
gingerbenw Nov 8, 2022
094a27a
Merge branch 'integration/v8' into PLAT-6697-perf-change-detection
gingerbenw Nov 8, 2022
bae0faf
fix ts issue
gingerbenw Nov 8, 2022
6ec6c34
Merge pull request #1861 from bugsnag/PLAT-6697-perf-change-detection
gingerbenw Nov 9, 2022
87e3ded
replace node domain API with AsyncLocalStorage
Jan 10, 2023
efb7b23
add failing test case for exception thrown async
Jan 11, 2023
0c06c0e
add failing test case for exception thrown async
Jan 11, 2023
e9ddedf
add duration breadcrumb metadata for xhr and fetch requests
yousif-bugsnag Jan 12, 2023
f603d30
add request duration to electron net breadcrumbs
yousif-bugsnag Jan 12, 2023
26654f0
Merge branch 'next' into yousif/sync-v8-with-next
yousif-bugsnag Jan 13, 2023
fc7c1aa
fix test
yousif-bugsnag Jan 13, 2023
fccc080
Add electron e2e tests for network breadcrumbs
yousif-bugsnag Jan 13, 2023
37c0123
only override the send method for the current request object
yousif-bugsnag Jan 13, 2023
98769ae
Merge pull request #1902 from bugsnag/yousif/sync-v8-with-next
yousif-bugsnag Jan 17, 2023
9221c1e
bump request resolution timeout for e2e tests
yousif-bugsnag Jan 17, 2023
9aa50ac
use local server for e2e tests and separate failure and error cases
yousif-bugsnag Jan 20, 2023
6a481f9
skip restify e2e tests on node 18
Jan 20, 2023
2491b02
Merge branch 'integration/v8' into node-remove-domain
Jan 20, 2023
259365e
skip restify e2e tests on node 18
Jan 20, 2023
7873231
skip restify e2e tests on node 18
Jan 20, 2023
3143b50
skip restify e2e tests on node 18
Jan 20, 2023
7e8167d
skip webpack e2e tests on node 18
Jan 20, 2023
2a0cbb9
Merge branch 'node-remove-domain' into node-remove-domain-2
Jan 23, 2023
4ae41ac
Merge branch 'node-remove-domain-2' into node-remove-domain-3
Jan 23, 2023
6a57894
capture uncaught exceptions in aws-lambda
Jan 23, 2023
70b3d8a
clean up diff
Jan 23, 2023
f16b524
assert that status is undefined when the request errors
yousif-bugsnag Jan 24, 2023
515a1e4
start recording duration on first write for chunked requests
yousif-bugsnag Jan 24, 2023
07fa693
revert to skipping electron net breadcrumb tests
yousif-bugsnag Jan 24, 2023
0a3f9ad
Merge pull request #1903 from bugsnag/PLAT-9443/network-breadcrumb-du…
yousif-bugsnag Jan 25, 2023
52ebe6f
Merge branch 'node-remove-domain' into node-remove-domain-3
Jan 30, 2023
bea049a
add requestContentLength breadcrumb metadata for xhr and fetch requests
yousif-bugsnag Feb 9, 2023
476e88e
bump maze runner to latest for browser tests
yousif-bugsnag Feb 9, 2023
e5235fa
add e2e tests
yousif-bugsnag Feb 9, 2023
326ff9d
update unit tests
yousif-bugsnag Feb 9, 2023
b0b462e
skip urlsearchparams tests on Edge
yousif-bugsnag Feb 13, 2023
7b71722
fix comments
yousif-bugsnag Feb 13, 2023
0b0d800
Merge pull request #1925 from bugsnag/PLAT-9444/network-breadcrumbs-r…
yousif-bugsnag Feb 13, 2023
a72509f
rewrite plugin-contextualize without domain
Feb 10, 2023
0e91aff
Merge branch 'integration/v8' into node-remove-domain
Feb 16, 2023
000c454
enable breadcrumbs and context-scoped calls for node
Feb 16, 2023
b72bcd5
manually set severityReason to unhandledErrorMiddleware in middlewares
Feb 22, 2023
f493a13
ensure handled states remain unchanged
Feb 23, 2023
5c681e9
remove unused @skip_after_node_
Feb 23, 2023
4b02048
call next directly in express and restify as per koa
Mar 1, 2023
26b5aed
Merge branch 'node-remove-domain' into node-remove-domain-3
Mar 1, 2023
935c9b0
fix test following upstream changes
Mar 1, 2023
eda4675
improve variable naming
Mar 1, 2023
054ea19
Merge pull request #1900 from bugsnag/node-remove-domain-3
djskinner Mar 1, 2023
9dd210c
Merge branch 'node-remove-domain-3' into contextualize
Mar 1, 2023
4f61d62
Merge branch 'node-remove-domain' into contextualize
Mar 1, 2023
a572bd4
update changelog
Mar 2, 2023
855c425
plugin-contextualize: always run in the async context
Mar 2, 2023
e6a91d3
change expectations on aws-lambda test
Mar 2, 2023
034c736
Merge pull request #1898 from bugsnag/node-remove-domain
djskinner Mar 6, 2023
e87ecaf
change expectations on aws-lambda test
Mar 6, 2023
a18b793
change expectations on aws-lambda test
Mar 6, 2023
340e7d6
Merge branch 'contextualize' into node-breadcrumbs
Mar 7, 2023
2907e06
deprecate req.bugsnag
Mar 7, 2023
c0e10d6
update to use scoped _clientContext
Mar 7, 2023
12a92eb
enable node notifier client interface tests
Mar 7, 2023
48cd972
improve test coverage of node client interface
Mar 7, 2023
77a905b
use Bugsnag instead of req.bugsnag in express fixture
Mar 7, 2023
230b36c
add v7-v8 node guide to UPGRADING.md
Mar 7, 2023
d6fd12c
add v7-v8 node guide to UPGRADING.md
Mar 7, 2023
630d9ca
Merge pull request #1924 from bugsnag/contextualize
djskinner Mar 8, 2023
9c3231c
fix test naming
Mar 8, 2023
daef77b
Merge branch 'next' into v8-merge-next
yousif-bugsnag Jul 6, 2023
477d93b
fix package-lock.json
yousif-bugsnag Jul 6, 2023
00430f2
fix mazerunner browser env
yousif-bugsnag Jul 6, 2023
a0856a8
fix node pipeline formatting
yousif-bugsnag Jul 6, 2023
d5ca494
Merge pull request #1984 from bugsnag/v8-sync-next
yousif-bugsnag Jul 7, 2023
b72a8ce
Merge pull request #1991 from bugsnag/sync-v8-with-next
yousif-bugsnag Jul 14, 2023
cbc15c0
Revert "add requestContentLength breadcrumb metadata for xhr and fetc…
yousif-bugsnag Jul 6, 2023
fee4d4e
separate request method and url metadata in plugin-network-breadcrumbs
yousif-bugsnag Jul 7, 2023
f84405d
separate method and url in network breadcrumb unit tests
yousif-bugsnag Jul 7, 2023
b0d2426
update network breadcrumb test fixtures
yousif-bugsnag Jul 7, 2023
af0ec0d
separate method and url metadata in electron net breadcrumbs
yousif-bugsnag Jul 7, 2023
6e18389
update electron net breadcrumb fixtures
yousif-bugsnag Jul 7, 2023
738816f
update changelog
yousif-bugsnag Jul 7, 2023
49eca4a
Update UPGRADING.md
djskinner Jul 14, 2023
bee12e8
Merge branch 'integration/v8' into node-breadcrumbs
Jul 14, 2023
20fb9c0
Update UPGRADING.md
djskinner Jul 14, 2023
70d86a5
Update UPGRADING.md
djskinner Jul 14, 2023
57c4c36
Update UPGRADING.md
djskinner Jul 14, 2023
af68910
Update UPGRADING.md
djskinner Jul 14, 2023
acefc51
bump body-parser in express fixture
Jul 14, 2023
5cdef6c
Merge pull request #1987 from bugsnag/PLAT-10552/remove-request-conte…
yousif-bugsnag Jul 17, 2023
28d9670
Merge pull request #1988 from bugsnag/PLAT-9448/rename-request-to-url
yousif-bugsnag Jul 17, 2023
164d06d
revert adding req.bugsnag deprecation
djskinner Jul 17, 2023
54007a5
revert adding req.bugsnag deprecation
Jul 17, 2023
019228f
add runInContext middleware to express plugin
Jul 19, 2023
6102558
add koa breadcrumb e2e test
Jul 25, 2023
036f3da
Merge branch 'integration/v8' into node-breadcrumbs
Jul 26, 2023
08a2bd8
Merge pull request #1927 from bugsnag/node-breadcrumbs
djskinner Aug 7, 2023
bde4264
startSession should no longer clone the client
Aug 11, 2023
cdde0fd
Update packages/plugin-server-session/test/session.test.ts
djskinner Aug 30, 2023
a491231
add plugin-contextualize note to UPGRADING.md
Aug 31, 2023
3c87066
Merge branch 'v8-upgrading-node' of github.com:bugsnag/bugsnag-js int…
Aug 31, 2023
bf75f5b
Merge branch 'next' into integration/v8
Aug 31, 2023
2970552
Merge branch 'integration/v8' into v8-upgrading-node
Aug 31, 2023
af62b01
Merge pull request #2003 from bugsnag/plat-10750
djskinner Sep 1, 2023
7eced91
Merge branch 'integration/v8' into v8-upgrading-node
Sep 1, 2023
21825b4
Enables the Integration branch changes to run using maze-runner v8 on…
Cawllec Sep 12, 2023
135ea40
Update UPGRADING.md
djskinner Sep 12, 2023
d56992d
Update UPGRADING.md
djskinner Sep 12, 2023
7033f42
Merge branch 'integration/v8' into v8-upgrading-node
Sep 12, 2023
d61a6f8
add note about process termination to UPGRADING.md
Sep 12, 2023
aa7ab2c
add note about process termination to UPGRADING.md
Sep 12, 2023
2cc1020
Add note about network breadcrumb metadata changes to UPGRADING.md
yousif-bugsnag Sep 12, 2023
607846d
Merge pull request #1934 from bugsnag/v8-upgrading-node
djskinner Sep 18, 2023
f6df6c3
Merge branch 'next' into integration/v8
twometresteve Oct 2, 2023
653952d
Merge branch 'next' into integration/v8
djskinner Oct 31, 2023
82e2b73
v8.0.0-alpha.0
Oct 31, 2023
4d99d5f
bump peer dependencies for v8
Nov 2, 2023
c178e75
revert packages/react-native-cli/package-lock.json changes
Nov 2, 2023
f78f693
loosen peer dependencies
Nov 3, 2023
90e8221
use ^8 for peer dependencies
Nov 3, 2023
4b44708
Revert "use ^8 for peer dependencies"
Nov 3, 2023
574ebb3
Revert "Revert "use ^8 for peer dependencies""
Nov 3, 2023
ac30f37
use --legacy-peer-deps to avoid auto install of peer deps
Nov 6, 2023
763a044
use --legacy-peer-deps to avoid auto install of peer deps
Nov 6, 2023
7f0451b
use --legacy-peer-deps to avoid auto install of peer deps
Nov 6, 2023
3223b65
use --legacy-peer-deps to avoid auto install of peer deps
Nov 6, 2023
2c3737a
use --legacy-peer-deps to avoid auto install of peer deps
Nov 7, 2023
8c0ce00
use --legacy-peer-deps to avoid auto install of peer deps
Nov 7, 2023
42b1f95
use --legacy-peer-deps to avoid auto install of peer deps
Nov 7, 2023
bf88719
use --legacy-peer-deps to avoid auto install of peer deps
Nov 7, 2023
4694295
use --legacy-peer-deps to avoid auto install of peer deps
Nov 7, 2023
5ae47e5
Merge pull request #2036 from bugsnag/bump-peer-deps
djskinner Nov 13, 2023
7892f3d
v8.0.0-alpha.1
Nov 14, 2023
4118641
enable breadcrumbs in node examples
Dec 4, 2023
fe52193
Track patched XHR requests for network breadcrumbs
yousif-bugsnag Dec 13, 2023
c9ccb54
Merge pull request #2055 from bugsnag/PLAT-11296/fix-xhr-monkey-patch
yousif-bugsnag Dec 14, 2023
f8a8d7e
Merge branch 'next' into integration/v8
Jan 16, 2024
159e236
v8.0.0-alpha.2
Jan 16, 2024
9b222a8
gracefully degrade an XMLHTTPRequest with undefined function context
Jan 30, 2024
7a8b3cb
Merge branch 'next' into integration/v8
Jan 30, 2024
718fb2f
Merge branch 'integration/v8' into xhr-this-undefined
Jan 30, 2024
59d8f8c
Merge pull request #2076 from bugsnag/xhr-this-undefined
djskinner Feb 5, 2024
5de96e1
doc(upgrade-guide): layout improvements for v8
Sep 25, 2023
e66d0ec
Merge branch 'next' into integration/v8
Feb 7, 2024
412dfd7
Merge branch 'next' into integration/v8
Feb 7, 2024
dbf6ef4
Merge branch 'integration/v8' of github.com:bugsnag/bugsnag-js into i…
Feb 7, 2024
a186e28
Merge pull request #2016 from bugsnag/tom/ug-updates
tomlongridge Feb 7, 2024
a7216d4
v8.0.0-alpha.3
Feb 7, 2024
551ac32
update v8 peer dependency range to match alpha releases
Mar 20, 2024
47a7737
Merge branch 'integration/v8' into v8-peer-deps
Mar 20, 2024
b15f5b9
v8.0.0-alpha.4
Mar 20, 2024
aca386b
Merge pull request #2050 from bugsnag/node-example-breadcrumbs
djskinner Mar 21, 2024
cda556c
Merge pull request #2100 from bugsnag/v8-peer-deps
djskinner Mar 21, 2024
45f42b7
Merge branch 'next' into integration/v8
Mar 27, 2024
081ae2b
fix crash when calling Bugsnag methods before start
Mar 27, 2024
5109825
do not use optional chaining
Mar 28, 2024
4e7cbd5
add node 20 to e2e test pipeline
Mar 28, 2024
0feb022
add automatic console breadcrumbs to node
Apr 3, 2024
1af0079
add automatic console breadcrumbs to node
Apr 3, 2024
7600450
v8.0.0-alpha.5
Mar 28, 2024
1172690
v8.0.0-alpha.6
Mar 28, 2024
619d05b
Merge branch 'integration/v8' into node-console-breadcrumbs
Apr 3, 2024
9b5fafd
v8.0.0-alpha.7
Apr 3, 2024
417dc73
Merge pull request #2103 from bugsnag/plat-11820
djskinner Apr 4, 2024
fa25555
make types for Bugsnag.start metadata consistent with addMetadata types
Apr 5, 2024
2f1ed64
Merge pull request #2111 from bugsnag/plat-9310
djskinner Apr 5, 2024
f915178
Remove build from AWS Lambda & server plugins
imjoehaines Apr 16, 2024
4263254
Use browser session plugin directly
imjoehaines Apr 16, 2024
2f6cd7b
Remove unused dependency
imjoehaines Apr 16, 2024
07155ec
Merge pull request #2120 from bugsnag/fix-aws-lambda-with-express
imjoehaines Apr 16, 2024
4aaa6df
Merge branch 'integration/v8' into node-console-breadcrumbs
Apr 17, 2024
53e5adb
Merge branch 'node-console-breadcrumbs' of github.com:bugsnag/bugsnag…
Apr 17, 2024
cf08291
fix bad merge
Apr 17, 2024
53e8166
remove bad cucumber step
Apr 17, 2024
b7858fb
automatically handle using the context client in node
Apr 17, 2024
a19ac9d
automatically handle using the context client in node
Apr 18, 2024
07354cc
fix lint
Apr 18, 2024
5902027
ensure private method calls are also forward to the correct client
Apr 19, 2024
f79fb47
Update packages/node/test/notifier.test.ts
djskinner Apr 22, 2024
850f92e
Merge pull request #2107 from bugsnag/node-console-breadcrumbs
djskinner Apr 22, 2024
86f1cbf
Update bugsnag-android from v5.32.2 to v6.4.0 (#2119)
gingerbenw Apr 24, 2024
98b989e
Merge branch 'integration/v8' into test-on-node-20
May 1, 2024
543984a
enable debug
May 1, 2024
bab29ee
bump restify version in test fixture
May 1, 2024
9e00d1c
fix runtime errors in restify fixture
May 1, 2024
4f6c7ea
fix runtime errors in restify fixture
May 1, 2024
bb54b9c
npm update webpack fixture dependencies
May 1, 2024
58f26f8
use latest webpack 4 in fixture
May 1, 2024
1a33f74
skip restify on node 12, re-instate on node 18
May 1, 2024
88aeea0
disable minification in webpack 5 fixture
May 1, 2024
be93fee
Merge branch 'next' into integration/v8
May 2, 2024
a599a56
Merge branch 'integration/v8' into test-on-node-20
May 2, 2024
7cb9c46
Revert "enable debug"
May 2, 2024
87ef8a8
Merge pull request #2106 from bugsnag/test-on-node-20
djskinner May 8, 2024
10185e9
Merge branch 'next' into integration/v8
May 13, 2024
c331bfb
Merge branch 'integration/v8' of github.com:bugsnag/bugsnag-js into i…
May 13, 2024
a5f778a
ensure peer dependencies pick alpha release
May 16, 2024
1acad37
v8.0.0-alpha.8
May 16, 2024
aa2585c
v8.0.0-alpha.9
May 16, 2024
3581fe3
debug
May 16, 2024
d32c47f
Revert "debug"
May 17, 2024
d7d5811
increase verdaccio max_body_size for electron test run
May 16, 2024
1f5d8df
Merge branch 'next' into integration/v8
May 22, 2024
915c527
Merge branch 'integration/v8' into fix-electron-v8
May 22, 2024
d9ac089
test: :fire: skip failing network breadcrumb tests
gingerbenw May 30, 2024
423afb9
wip
Jun 4, 2024
1adb7bd
Merge branch 'fix-electron-v8' of github.com:bugsnag/bugsnag-js into …
Jun 4, 2024
a4293f4
wip
Jun 4, 2024
32df6c2
wip
Jun 5, 2024
7db5ab0
change request port in network test
Jun 28, 2024
38e53f7
rever unnecessary changes
Jun 28, 2024
b643efb
rever unnecessary changes
Jun 28, 2024
b053f9e
revert revert
Jun 28, 2024
b8ac17f
Merge branch 'next' into integration/v8
Jul 1, 2024
37b6b0d
Merge branch 'integration/v8' into fix-electron-v8
Jul 1, 2024
9f20e16
Merge branch 'master' into gingerbenw/catchup-next-16-07
gingerbenw Jul 16, 2024
d54789b
deps(react-native): Update bugsnag-android to v6.6.1
gingerbenw Jul 16, 2024
295998d
v8.0.0-alpha.10
gingerbenw Jul 16, 2024
41f20f8
Merge pull request #2173 from bugsnag/gingerbenw/catchup-next-16-07
gingerbenw Jul 17, 2024
024fd4d
Merge pull request #2172 from bugsnag/android-661
gingerbenw Jul 22, 2024
6118ca0
[PLAT-12474] Support error correlation property in events (#2174)
gingerbenw Jul 24, 2024
0c0fd2e
Merge pull request #2141 from bugsnag/fix-electron-v8
djskinner Jul 24, 2024
ff8e363
Merge branch 'next' into integration/v8
gingerbenw Jul 24, 2024
2b60b86
[PLAT-12488] React native test failures (#2176)
gingerbenw Jul 26, 2024
8099ab7
Merge branch 'next' into integration/v8
gingerbenw Jul 31, 2024
0b5829c
v8.0.0-alpha.11
gingerbenw Jul 26, 2024
63a9eb4
v8.0.0-alpha.12
gingerbenw Jul 31, 2024
4eee888
Merge pull request #2177 from bugsnag/release/8.0.0-alpha.11
gingerbenw Jul 31, 2024
eb9c706
[PLAT-12487] Handle correlation property in iOS events (#2181)
gingerbenw Aug 5, 2024
d50f826
v8.0.0-alpha.13
gingerbenw Aug 5, 2024
708fe8b
Merge pull request #2186 from bugsnag/release/8.0.0-alpha.13
gingerbenw Aug 22, 2024
510c326
docs: update for v8
Aug 27, 2024
669e231
Merge pull request #2191 from bugsnag/tom/v8-docs
tomlongridge Aug 28, 2024
3ba1473
Merge branch 'next' into integration/v8
gingerbenw Aug 28, 2024
153bba4
Apply suggestions from code review
gingerbenw Aug 28, 2024
fc02f00
fix clientContext.getStore() calls
gingerbenw Aug 29, 2024
c06b16b
reduce number of calls to _clientContext.getStore()
gingerbenw Aug 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .buildkite/basic/node-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@ steps:
depends_on: "node-maze-runner-image"
timeout_in_minutes: 30
matrix:
- 4
- 6
- 8
- 10
- 12
- 14
- 16
- 18
- 20
plugins:
docker-compose#v4.12.0:
run: node-maze-runner
Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Changelog

## [8.0.0] - Unreleased

### Summary

As well as some bug fixes and **breaking changes** described in the [Upgrade Guide](./UPGRADING.md), this major SDK release has the following key features:

- Improved API for NodeJS: the `Bugsnag` client can now be used to call SDK methods in the context of the current request
- Breadcrumb support for NodeJS: we now support manual breadcrumbs and capture console breadcrumbs automatically
- Improved session reporting for single page apps: a session is now created only once per page load to more accurately reflect a user's session in your app

### Added

- (node) Add support for manual breadcrumbs [#1927](https://github.com/bugsnag/bugsnag-js/pull/1927) and automatic console breadcrumbs [#2107](https://github.com/bugsnag/bugsnag-js/pull/2107)
- Support error correlation properties in event payloads [#2174](https://github.com/bugsnag/bugsnag-js/pull/2174)

### Fixed

- (plugin-angular) Prevent excess change detection cycles when calling `Bugsnag.notify` [#1861](https://github.com/bugsnag/bugsnag-js/pull/1861)

### Changed

- (node) Enable breadcrumbs and context-scoped calls [#1927](https://github.com/bugsnag/bugsnag-js/pull/1927)
- (plugin-contextualize) Reimplement without relying on the deprecated node Domain API. From Node 16+ unhandled promise rejections are also supported [#1924](https://github.com/bugsnag/bugsnag-js/pull/1924)
- (plugin-navigation-breadcrumbs) Calling `pushState` or `replaceState` no longer triggers a new session when `autoTrackSessions` is enabled [#1820](https://github.com/bugsnag/bugsnag-js/pull/1820)
- (plugin-network-breadcrumbs, plugin-electron-net-breadcrumbs) *Breaking change*: The `request` metadata field in network breadcrumbs has been renamed to `url` and is no longer pre-pended with the HTTP method [#1988](https://github.com/bugsnag/bugsnag-js/pull/1988)
- (plugin-network-breadcrumbs, plugin-electron-net-breadcrumbs) Add `method` metadata field to network breadcrumbs [#1988](https://github.com/bugsnag/bugsnag-js/pull/1988)
- (plugin-network-breadcrumbs, plugin-electron-net-breadcrumbs) Add `duration` metadata field to network breadcrumbs [#1903](https://github.com/bugsnag/bugsnag-js/pull/1903)
- (react-native) Update bugsnag-android from v5.32.2 to [v6.6.1](https://github.com/bugsnag/bugsnag-android/blob/next/CHANGELOG.md#661-2024-07-03)

## [7.25.1] - 2024-08-27

### Changed
Expand Down
82 changes: 82 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,88 @@
Upgrading
=========

## 7.x to 8.x

As well as some bug fixes and **breaking changes**, this major SDK release has the following key features:

- Improved API for NodeJS: the `Bugsnag` client can now be used to call SDK methods in the context of the current request
- Breadcrumb support for NodeJS: we now support manual breadcrumbs and capture console breadcrumbs automatically
- Improved session reporting for single page apps: a session is now created only once per page load to more accurately reflect a user's session in your app

### Amended triggers for automatically tracked sessions for web apps

To avoid over-reporting of session in browser-based apps, particularly SPAs, `replaceState` and `pushState` now no longer result in a new session. BugSnag sessions are now only created on full page loads. Depending on the type of web app you have, you may notice a drop in overall session numbers after upgrading.

### Node.js support

The minimum supported Node version is now v12.17.0.

### Breadcrumb support for Node.js

Breadcrumb support has been enabled for Node.js apps. This means you can call `Bugsnag.leaveBreadcrumb` to attach short log statements to each error report to help diagnose what events led to the error. However, no breadcrumbs are currently automatically collected.

### Context-aware `Bugsnag` calls for Node.js

When using `plugin-express`, `plugin-koa`, `plugin-restify`, or `plugin-contextualize`, a clone of the top-level Bugsnag client is made so that any subsequent changes made to the client (such as attaching metadata) only affect the scope of the current web request (or a function call, when using `plugin-contextualize`).

Prior to `bugsnag-js` v8, calls made to the top-level `Bugsnag` static interface were not aware of this context so users had to ensure they were calling methods on the correct client instance, i.e. the cloned client that was made available on `req.bugsnag` (or `ctx.bugsnag` for Koa). This wasn't ideal because if you wanted to interact with the Bugsnag client in some function deep in a call stack you would have to pass `req.bugsnag` all the way down, as calling `Bugsnag.notify` would not have contained the request metadata gathered by the plugin.

With version 8 of the notifier, top-level calls to `Bugsnag` are now context-aware. This means you can call `Bugsnag.notify` (or `Bugsnag.leaveBreadcrumb` etc.), and, if it was called within a context, the call will be forwarded to the correct cloned version of that client (i.e. for the particular request from which the call originated).

Express:

```diff
app.get('/handled', function (req, res) {
- req.bugsnag.notify(new Error('handled'))
+ Bugsnag.notify(new Error('handled'))
})
```

Koa:

```diff
app.use(async (ctx, next) => {
if (ctx.path === '/handled') {
- ctx.bugsnag.notify(new Error('handled'))
+ Bugsnag.notify(new Error('handled'))
await next()
} else {
await next()
}
})
```

#### Notes

* `req.bugsnag` (and `ctx.bugsnag` in koa) is still present in version 8 of `bugsnag-js`, so you can continue using these as before.
* There are rare situations on Express servers when this contextual storage can get lost, causing the data stored to become server-scoped and so affect all threads that are being executed. See our [online docs](https://docs.bugsnag.com/platforms/javascript/express/node-async/#context-loss-in-express-servers) for full details.

### BugSnag no longer prevents the Node.js process from exiting

Prior to `bugsnag-js` v8, unhandled errors in requests were caught using the deprecated Domain API and the error handler attached to the domain was preventing the termination of the Node process. With version 8, BugSnag no longer changes the normal behavior of the application and so uncaught exceptions thrown in request handlers (and `plugin-contextualize` callbacks, see below) will cause the process to terminate.

### `plugin-contextualize` behavior

Unhandled errors that occur within a contextualize context now respect the `autoDetectErrors` and `enabledErrorTypes` configuration options. Previously unhandled errors would have been caught regardless of the configuration.

As noted above, with this release uncaught exceptions occurring within a contextualize context will cause the Node process to terminate where previously the error handler incorrectly prevented this happening.

### `request` replaced with `url` and `method` in network breadcrumb metadata

Prior to v8, network breadcrumb metadata included a field named `request`, which contained the request URL prepended with the HTTP method (e.g. `"GET https://request-url.com/`). This has been replaced with two separate metadata fields named `url` and `method`, which contain the request URL and HTTP method respectively.

### Angular `onError` callbacks from `notify`

Prior to v8, calls to `notify` triggered change detection cycles which could affect performance. Using built-in Angular zones, this has [now been eliminated](https://github.com/bugsnag/bugsnag-js/pull/1861). However this means that any changes made to templates from the `onError` will no longer trigger a render and so will need to be manually re-rendered.

### Validation of BugSnag endpoints

As of v8, for consistency with other BugSnag platforms, if only one [endpoint](https://docs.bugsnag.com/platforms/javascript/configuration-options/#endpoints) is set in configuration, no events **or** sessions will be sent. To correctly setup BugSnag for on-premise, both `notify` and `sessions` endpoint should be set. This change reduces the possibility of a misconfigured client leaking data to the wrong BugSnag server.

### `request` replaced with `url` and `method` in network breadcrumb metadata

Prior to v8, network breadcrumb metadata included a field named `request`, which contained the request URL prepended with the HTTP method (e.g. `"GET https://request-url.com/`). This has been replaced with two separate metadata fields named `url` and `method`, which contain the request URL and HTTP method respectively.

gingerbenw marked this conversation as resolved.
Show resolved Hide resolved
## `bugsnag-react-native@*` to `@bugsnag/react-native@7.3`

As of `v7.3` of the [`bugsnag-js` monorepo](https://github.com/bugsnag/bugsnag-js) it contains Bugsnag's SDK for React Native. This additional notifier joins `@bugsnag/js` and `@bugsnag/expo` in its unified version scheme, so the first version of `@bugsnag/react-native` is `v7.3.0`.
Expand Down
4 changes: 3 additions & 1 deletion bin/local-test-util
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ async function installNotifiers (notifier) {
await ex(`npm`, [
`install`,
`--no-package-lock`,
`--no-save`
`--no-save`,
`--legacy-peer-deps`
].concat(notifier
? [
`../../../../bugsnag-${notifier}-${require(`../packages/${notifier}/package.json`).version}.tgz`
Expand All @@ -161,6 +162,7 @@ async function installNgNotifier (notifier) {
`install`,
`--no-package-lock`,
`--no-save`,
`--legacy-peer-deps`,
`../../../../../../bugsnag-browser-${require('../packages/browser/package.json').version}.tgz`,
`../../../../../../bugsnag-js-${require('../packages/js/package.json').version}.tgz`,
`../../../../../../bugsnag-node-${require('../packages/node/package.json').version}.tgz`,
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ services:
command: --fail-fast --retry 2
environment:
<<: *common-environment
NODE_VERSION: "${NODE_VERSION:-10}"
COMPOSE_PROJECT_NAME: "node${NODE_VERSION:-10}"
NODE_VERSION: "${NODE_VERSION:-12}"
COMPOSE_PROJECT_NAME: "node${NODE_VERSION:-12}"
NETWORK_NAME: "${BUILDKITE_JOB_ID:-js-maze-runner}"
DEBUG:
networks:
Expand Down
10 changes: 5 additions & 5 deletions dockerfiles/Dockerfile.browser
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ RUN npm pack --verbose packages/web-worker/
COPY test/browser/features test/browser/features

WORKDIR /app/test/browser/features/fixtures
RUN npm install --no-package-lock --no-save ../../../../bugsnag-browser-*.tgz
RUN npm install --no-package-lock --no-save ../../../../bugsnag-plugin-react-*.tgz
RUN npm install --no-package-lock --no-save ../../../../bugsnag-plugin-vue-*.tgz
RUN npm install --no-package-lock --no-save ../../../../bugsnag-web-worker-*.tgz
RUN npm install --no-package-lock --no-save --legacy-peer-deps ../../../../bugsnag-browser-*.tgz
RUN npm install --no-package-lock --no-save --legacy-peer-deps ../../../../bugsnag-plugin-react-*.tgz
RUN npm install --no-package-lock --no-save --legacy-peer-deps ../../../../bugsnag-plugin-vue-*.tgz
RUN npm install --no-package-lock --no-save --legacy-peer-deps ../../../../bugsnag-web-worker-*.tgz
WORKDIR plugin_angular/ng
RUN npm install --no-package-lock --no-save \
RUN npm install --no-package-lock --no-save --legacy-peer-deps \
../../../../../../bugsnag-plugin-angular-*.tgz \
../../../../../../bugsnag-node-*.tgz \
../../../../../../bugsnag-browser-*.tgz \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ARG REG_NPM_EMAIL
RUN echo "_auth=$REG_BASIC_CREDENTIAL" >> ~/.npmrc
RUN echo "email=$REG_NPM_EMAIL" >> ~/.npmrc
RUN echo "always-auth=true" >> ~/.npmrc
RUN echo "legacy-peer-deps=true" >> ~/.npmrc

# gradle / artifactory auth
ARG MAVEN_REPO_URL
Expand Down
1 change: 1 addition & 0 deletions dockerfiles/Dockerfile.react-native-cli-android-builder
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ RUN echo "registry=$REGISTRY_URL" >> ~/.npmrc
RUN echo "_auth=$REG_BASIC_CREDENTIAL" >> ~/.npmrc
RUN echo "email=$REG_NPM_EMAIL" >> ~/.npmrc
RUN echo "always-auth=true" >> ~/.npmrc
RUN echo "legacy-peer-deps=true" >> ~/.npmrc

# Now copy in all the files needed to build
COPY .git .git
Expand Down
3 changes: 1 addition & 2 deletions examples/js/plain-node/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ process.stdin.on('data', function (d) {
switch (d) {
case 'u': return unhandledError()
case 'h': return handledError()
//case 'l': return leaveBreadcrumb()
case 'l': return leaveBreadcrumb()
case 'o': return onError()
default: return unknown(d)
}
Expand All @@ -59,7 +59,6 @@ function handledError () {
Bugsnag.notify(new Error('scheduling clash'))
}

// TODO Breadcrumbs not yet implemented for Node
function leaveBreadcrumb () {
console.log('leaving a breadcrumb…')
// you can record all kinds of events which will be sent along with error reports
Expand Down
3 changes: 1 addition & 2 deletions examples/ts/plain-node/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ process.stdin.on('data', function (d: Buffer) {
switch (str) {
case 'u': return unhandledError()
case 'h': return handledError()
//case 'l': return leaveBreadcrumb()
case 'l': return leaveBreadcrumb()
case 'o': return onError()
default: return unknown(str)
}
Expand All @@ -61,7 +61,6 @@ function handledError () {
Bugsnag.notify(new Error('scheduling clash'))
}

// TODO Breadcrumbs not yet implemented for Node
function leaveBreadcrumb () {
console.log('leaving a breadcrumb…')
// you can record all kinds of events which will be sent along with error reports
Expand Down
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ module.exports = {
], {
testEnvironment: 'node',
testMatch: [
'<rootDir>/packages/node/test/**/*.test.[jt]s',
'<rootDir>/packages/node/test/integration/**/*.test.[jt]s'
]
}),
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"packages": [
"packages/*"
],
"version": "7.25.1"
"version": "8.0.0-alpha.13"
}
2 changes: 1 addition & 1 deletion packages/browser/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 19 additions & 20 deletions packages/browser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bugsnag/browser",
"version": "7.25.0",
"version": "8.0.0-alpha.13",
"main": "dist/bugsnag.js",
"types": "types/bugsnag.d.ts",
"description": "Bugsnag error reporter for browser JavaScript",
Expand Down Expand Up @@ -30,26 +30,25 @@
"author": "Bugsnag",
"license": "MIT",
"devDependencies": {
"@bugsnag/core": "^7.0.1",
"@bugsnag/delivery-x-domain-request": "^7.25.0",
"@bugsnag/delivery-xml-http-request": "^7.25.0",
"@bugsnag/plugin-app-duration": "^7.25.0",
"@bugsnag/plugin-browser-context": "^7.25.0",
"@bugsnag/plugin-browser-device": "^7.25.0",
"@bugsnag/plugin-browser-request": "^7.25.0",
"@bugsnag/plugin-browser-session": "^7.25.0",
"@bugsnag/plugin-client-ip": "^7.25.0",
"@bugsnag/plugin-console-breadcrumbs": "^7.25.0",
"@bugsnag/plugin-inline-script-content": "^7.25.0",
"@bugsnag/plugin-interaction-breadcrumbs": "^7.25.0",
"@bugsnag/plugin-navigation-breadcrumbs": "^7.25.0",
"@bugsnag/plugin-network-breadcrumbs": "^7.25.0",
"@bugsnag/plugin-simple-throttle": "^7.25.0",
"@bugsnag/plugin-strip-query-string": "^7.25.0",
"@bugsnag/plugin-window-onerror": "^7.25.0",
"@bugsnag/plugin-window-unhandled-rejection": "^7.25.0"
"@bugsnag/delivery-x-domain-request": "^8.0.0-alpha.13",
"@bugsnag/delivery-xml-http-request": "^8.0.0-alpha.13",
"@bugsnag/plugin-app-duration": "^8.0.0-alpha.13",
"@bugsnag/plugin-browser-context": "^8.0.0-alpha.13",
"@bugsnag/plugin-browser-device": "^8.0.0-alpha.13",
"@bugsnag/plugin-browser-request": "^8.0.0-alpha.13",
"@bugsnag/plugin-browser-session": "^8.0.0-alpha.13",
"@bugsnag/plugin-client-ip": "^8.0.0-alpha.13",
"@bugsnag/plugin-console-breadcrumbs": "^8.0.0-alpha.13",
"@bugsnag/plugin-inline-script-content": "^8.0.0-alpha.13",
"@bugsnag/plugin-interaction-breadcrumbs": "^8.0.0-alpha.13",
"@bugsnag/plugin-navigation-breadcrumbs": "^8.0.0-alpha.13",
"@bugsnag/plugin-network-breadcrumbs": "^8.0.0-alpha.13",
"@bugsnag/plugin-simple-throttle": "^8.0.0-alpha.13",
"@bugsnag/plugin-strip-query-string": "^8.0.0-alpha.13",
"@bugsnag/plugin-window-onerror": "^8.0.0-alpha.13",
"@bugsnag/plugin-window-unhandled-rejection": "^8.0.0-alpha.13"
},
"dependencies": {
"@bugsnag/core": "^7.25.0"
"@bugsnag/core": "^8.0.0-alpha.13"
}
}
Loading
Loading