Skip to content

Commit 458ea80

Browse files
authored
Merge pull request #1079 from appsignal/rename-heartbeats-to-cron-checkins
Rename heartbeats to cron check-ins
2 parents 7fc918f + dc7691a commit 458ea80

File tree

8 files changed

+585
-373
lines changed

8 files changed

+585
-373
lines changed

.changesets/deprecate-heartbeats.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
bump: patch
3+
type: deprecate
4+
---
5+
6+
Calls to `Appsignal.heartbeat` and to the `Appsignal.Heartbeat` constructor will emit a deprecation warning.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
bump: patch
3+
type: change
4+
---
5+
6+
Rename heartbeats to cron check-ins. Calls to `Appsignal.heartbeat` and `Appsignal.Heartbeat` should be replaced with calls to `Appsignal.checkIn.cron` and `Appsignal.checkIn.Cron`, for example:
7+
8+
```js
9+
// Before
10+
import { heartbeat } from "@appsignal/nodejs"
11+
12+
heartbeat("do_something", () => {
13+
do_something()
14+
})
15+
16+
// After
17+
import { checkIn } from "@appsignal/nodejs"
18+
19+
checkIn.cron("do_something", () => {
20+
do_something
21+
})
22+
```

0 commit comments

Comments
 (0)