Skip to content

Commit

Permalink
Rename heartbeats to cron check-ins
Browse files Browse the repository at this point in the history
See appsignal/appsignal-elixir#957.

Emit a deprecation warning both when the `heartbeat` helper is used
and when the `Heartbeat` class is initialised, but only once each.
  • Loading branch information
unflxw committed Jul 15, 2024
1 parent f730711 commit 8b057f1
Show file tree
Hide file tree
Showing 7 changed files with 575 additions and 373 deletions.
24 changes: 24 additions & 0 deletions .changesets/rename-heartbeats-to-cron-check-ins.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
bump: patch
type: change
---

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:

```js
// Before
import { heartbeat } from "@appsignal/nodejs"

heartbeat("do_something", () => {
do_something()
})

// After
import { checkIn } from "@appsignal/nodejs"

checkIn.cron("do_something", () => {
do_something
})
```

Calls to `Appsignal.heartbeat` and to the `Appsignal.Heartbeat` constructor will emit a deprecation warning.
Loading

0 comments on commit 8b057f1

Please sign in to comment.