From df825893f49f7a24086ec7854b309f1bbccd09a4 Mon Sep 17 00:00:00 2001 From: Noemi <45180344+unflxw@users.noreply.github.com> Date: Fri, 13 Sep 2024 19:04:56 +0200 Subject: [PATCH] Add heartbeat check-ins `sinatra-puma` endpoint --- ruby/sinatra-puma/app/app.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ruby/sinatra-puma/app/app.rb b/ruby/sinatra-puma/app/app.rb index 2d4dd9e0..d880dc25 100644 --- a/ruby/sinatra-puma/app/app.rb +++ b/ruby/sinatra-puma/app/app.rb @@ -24,6 +24,7 @@
  • Multiple errors with custom instrumentation
  • Array response body
  • Custom cron check-in
  • +
  • Custom heartbeat check-in
  • HTML end @@ -92,6 +93,14 @@ class AnotherCustomError < StandardError "Cron check-in sent!" end +get "/heartbeat" do + Appsignal::CheckIn.heartbeat("custom-heartbeat-checkin") + + "Heartbeat check-in sent!" +end + +Appsignal::CheckIn.heartbeat("continuous-heartbeat-checkin", continuous: true) + class MyResponseBody def initialize @body = []