← Changelog

Add support for heartbeat check-ins

Oct 09, 2024
Python1.4.0

Added

  • Add support for heartbeat check-ins.

    Use the appsignal.check_in.heartbeat function to send a single heartbeat check-in event from your application. This can be used, for example, in your application's main loop:

    Python
    from appsignal.check_in import heartbeat
     
    while True:
      heartbeat("job_processor")
      process_job()

    Heartbeats are deduplicated and sent asynchronously, without blocking the current thread. Regardless of how often the .heartbeat function 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:

    Python
    def main():
      start_app()
      heartbeat("my_app", continuous=True)

Changed

  • Change the primary download mirror for integrations.
  • Send check-ins concurrently. When calling appsignal.check_in.cron, instead of blocking the current thread while the check-in events are sent, schedule them to be sent in a separate thread.

View the Python package v1.4.0 changelog for more information.

$appsignal install

Make your next crash make sense.

Free for 30 days. No credit card. Two-minute install.