diff --git a/.changesets/add-heartbeat-check-ins.md b/.changesets/add-heartbeat-check-ins.md deleted file mode 100644 index 09b567da..00000000 --- a/.changesets/add-heartbeat-check-ins.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -bump: minor -type: add ---- - -Add support for heartbeat check-ins. - -Use the `checkIn.heartbeat` method to send a single heartbeat check-in event from your application. This can be used, for example, in your application's main loop: - -```js -import { checkIn } from "@appsignal/nodejs" - -while (true) { - checkIn.heartbeat("job_processor") - await processJob() -} -``` - -Heartbeats are deduplicated and sent asynchronously, without blocking the current thread. Regardless of how often the `.heartbeat` method is called, at most one heartbeat with the same identifier will be sent every ten seconds. - -Pass `{continuous: true}` as the second argument to send heartbeats continuously during the entire lifetime of the current process. This can be used, for example, after your application has finished its boot process: - -```js -import { checkIn } from "@appsignal/nodejs" - -function main() { - checkIn.heartbeat("job_processor", {continuous: true}) - startApp() -} -``` diff --git a/.changesets/check-in-scheduler.md b/.changesets/check-in-scheduler.md deleted file mode 100644 index 4a1d7edc..00000000 --- a/.changesets/check-in-scheduler.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -bump: patch -type: change ---- - -Send check-ins concurrently. When calling `Appsignal.checkIn.cron`, instead of blocking the current process while the check-in events are sent, schedule them to be sent in a separate process. diff --git a/.changesets/do-not-block-node-js-shutdown.md b/.changesets/do-not-block-node-js-shutdown.md deleted file mode 100644 index 3ce54250..00000000 --- a/.changesets/do-not-block-node-js-shutdown.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -bump: patch -type: change ---- - -Do not block Node.js shutdown. It is no longer necessary to call `Appsignal.stop` for the Node.js engine to allow itself to shut down. It should still be called and awaited in production scenarios and at the end of scripts, as it ensures that scheduled check-ins are delivered. diff --git a/CHANGELOG.md b/CHANGELOG.md index 398c1224..a1783232 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,44 @@ # AppSignal for Node.js Changelog +## 3.5.0 + +_Published on 2024-09-26._ + +### Added + +- Add support for heartbeat check-ins. + + Use the `checkIn.heartbeat` method to send a single heartbeat check-in event from your application. This can be used, for example, in your application's main loop: + + ```js + import { checkIn } from "@appsignal/nodejs" + + while (true) { + checkIn.heartbeat("job_processor") + await processJob() + } + ``` + + Heartbeats are deduplicated and sent asynchronously, without blocking the current thread. Regardless of how often the `.heartbeat` method is called, at most one heartbeat with the same identifier will be sent every ten seconds. + + Pass `{continuous: true}` as the second argument to send heartbeats continuously during the entire lifetime of the current process. This can be used, for example, after your application has finished its boot process: + + ```js + import { checkIn } from "@appsignal/nodejs" + + function main() { + checkIn.heartbeat("job_processor", {continuous: true}) + startApp() + } + ``` + + (minor [839073e](https://github.com/appsignal/appsignal-nodejs/commit/839073e8c3a13956e7ec5019039095e15a7cf402)) + +### Changed + +- Send check-ins concurrently. When calling `Appsignal.checkIn.cron`, instead of blocking the current process while the check-in events are sent, schedule them to be sent in a separate process. (patch [a61d16b](https://github.com/appsignal/appsignal-nodejs/commit/a61d16b46b5db519db87db1dd0e93b52bb65f908)) +- Do not block Node.js shutdown. It is no longer necessary to call `Appsignal.stop` for the Node.js engine to allow itself to shut down. It should still be called and awaited in production scenarios and at the end of scripts, as it ensures that scheduled check-ins are delivered. (patch [0f438d6](https://github.com/appsignal/appsignal-nodejs/commit/0f438d65c87c5f43955f696f3d4feed397e673c3)) + ## 3.4.9 _Published on 2024-08-14._ diff --git a/package.json b/package.json index b79d1f36..a3bd2ebb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@appsignal/nodejs", - "version": "3.4.9", + "version": "3.5.0", "main": "dist/index", "types": "dist/index", "license": "MIT",