Skip to content

Commit

Permalink
Add heartbeat check-ins sinatra-puma endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
unflxw committed Sep 16, 2024
1 parent b6269da commit df82589
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ruby/sinatra-puma/app/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<li><a href="/errors?time=#{time}">Multiple errors with custom instrumentation</a></li>
<li><a href="/array?time=#{time}">Array response body</a></li>
<li><a href="/cron?time=#{time}">Custom cron check-in</a></li>
<li><a href="/heartbeat?time=#{time}">Custom heartbeat check-in</a></li>
</ul>
HTML
end
Expand Down Expand Up @@ -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 = []
Expand Down

0 comments on commit df82589

Please sign in to comment.