Reporting Check-ins via your AppSignal Integration

AppSignal for RubyThis feature requires version 3.13.0 or higher.
AppSignal for ElixirThis feature requires version 2.12.2 or higher.
AppSignal for Node.jsThis feature requires version 3.4.9 or higher.
AppSignal for PythonThis feature requires version 1.3.8 or higher.

We've renamed Heartbeats to Check-ins. Our helper methods/functions and API endpoints have also been renamed to reflect this change.

The Check-in feature is currently only available to Beta Testers. If you think your application is a good candidate, send an email to support@appsignal.com!"

AppSignal offers helper methods/functions that send check-ins automatically with the following integrations:

This documentation will explain how you can use AppSignal's helpers to send check-ins from your app's processes.

Check-in types

Our helpers allow you to monitor background processes by sending AppSignal Start and Finish check-ins:

  • Start Check-in notify AppSignal that a process has started, its status will be updated to Running.
  • Finish Check-in notify AppSignal that a process has been completed, its status will be updated to:
    • Success: if the process is completed within the Check-in's maximum job duration.
    • Late: if the process completes after the pre-defined maximum job duration.

Monitoring options

You can use AppSignal's helpers to either:

  • Send a single Finish Check-in to notify AppSignal when a process is completed.
  • Send two separate check-ins: a Start Check-in to signal the start of a process and a Finish Check-in to signal its completion to AppSignal.

When sending both a Start and Finish Check-in AppSignal can report the actual run time of the process being monitored.

Helper methods/functions have been updated to reflect the renaming of the Heartbeats feature to Check-ins. The functionality remains the same. See the examples below for the new naming conventions.

Send Finish Check-ins

To send a Finish Check-in, execute the cron helper function at the end of the process you are monitoring.

The cron helper requires you to pass the name of the cron check-in you are monitoring, as it's defined in AppSignal.

For example, when sending a Finish Check-in from a process, with the Check-in name of send_invoices:

elixir
nodejs
python
ruby
elixir
def send_invoices do # ... your code here ... Appsignal.CheckIn.cron("send_invoices") end
javascript
// Don't forget to import the `checkIn` helpers: import { checkIn } from "@appsignal/nodejs"; function sendInvoices() { // ... your code here ... checkIn.cron("send_invoices"); }
python
# Don't forget to import the `cron` helper function from the # `appsignal.check_in` module. from appsignal.check_in import cron def send_invoices(): # ... your code here ... cron("send_invoices")
ruby
def send_invoices # ... your code here ... Appsignal::CheckIn.cron("send_invoices") end

Send Start and Finish Check-ins

Depending on your programming language, you can pass either a function or block to the cron helper to report when the process starts and finishes, allowing you to see the duration of the process.

elixir
nodejs
python
ruby
elixir
def send_invoices do Appsignal.CheckIn.cron("send_invoices", fn -> # ... your code here ... end) end
javascript
// Don't forget to import the `checkIn` helpers: import { checkIn } from "@appsignal/nodejs"; function sendInvoices() { checkIn.cron("send_invoices", () => { // ... your code here ... }); } // If the function passed to `cron` returns a promise, the finish event // will be reported to AppSignal if the promise resolves, allowing you // to track the duration of async functions: import { checkIn } from "@appsignal/nodejs"; async function sendInvoices() { await checkIn.cron("send_invoices", async () => { // ... your async code here ... }); } // If the promise is rejected, or if it never resolves, the finish event // will not be reported to AppSignal.
python
# Don't forget to import the `cron` helper function from the # `appsignal.check_in` module. from appsignal.check_in import cron def send_invoices(): # ... your code here ... cron("send_invoices", send_invoices)
ruby
def send_invoices() Appsignal::CheckIn.cron("send_invoices") do # ... your code here ... end end

Exceptions

If an exception is raised within the function or method being monitored, the finish event will not be reported to AppSignal, triggering a missing check-in notification.

If the process from where the exception is raised is an AppSignal supported integration then an exception will be reported to AppSignal independently from the check-in:

Reviewing check-ins occurrences in AppSignal

Once configured, AppSignal will begin to display information about occurrences for your check-ins.

You can read more about occurrences in our Check-in Occurrences documentation.