Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add heartbeat check-ins sinatra-puma endpoint #227

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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