diff --git a/elixir/plug/app/lib/plug_example.ex b/elixir/plug/app/lib/plug_example.ex
index 15def3ef..125eda34 100644
--- a/elixir/plug/app/lib/plug_example.ex
+++ b/elixir/plug/app/lib/plug_example.ex
@@ -19,12 +19,12 @@ defmodule PlugExample do
raise "Whoops!"
end
- get "/heartbeats" do
- Appsignal.heartbeat("custom-heartbeat", fn ->
+ get "/cron" do
+ Appsignal.CheckIn.cron("custom-cron-checkin", fn ->
:timer.sleep(3000)
end)
- send_resp(conn, 200, "Heartbeat sent!")
+ send_resp(conn, 200, "Cron check-in sent!")
end
get "/custom_instrumentation" do
diff --git a/nodejs/express-redis/app/src/app.ts b/nodejs/express-redis/app/src/app.ts
index 73e68c71..37b7b040 100644
--- a/nodejs/express-redis/app/src/app.ts
+++ b/nodejs/express-redis/app/src/app.ts
@@ -1,7 +1,7 @@
import express from "express"
import { createClient } from "redis"
import ioredis from "ioredis"
-import { setTag, setCustomData, expressErrorHandler, WinstonTransport, heartbeat } from "@appsignal/nodejs"
+import { setTag, setCustomData, expressErrorHandler, WinstonTransport, checkIn } from "@appsignal/nodejs"
import { trace } from "@opentelemetry/api"
import cookieParser from "cookie-parser"
import winston from "winston"
@@ -113,12 +113,12 @@ app.get("/route-param/:id", (req, res) => {
res.send(`Route parameter id
: ${req.params.id}`)
})
-app.get("/heartbeat", async (req, res) => {
- await heartbeat("custom-heartbeat", () =>
+app.get("/cron", async (req, res) => {
+ await checkIn.cron("custom-cron-checkin", () =>
new Promise((resolve) => setTimeout(resolve, 3000))
)
- res.send("Heartbeat sent!")
+ res.send("Cron check-in sent!")
})
app.get("/fetch", async (req, res, next) => {
diff --git a/python/flask/app/app.py b/python/flask/app/app.py
index d58c65b7..b788a913 100644
--- a/python/flask/app/app.py
+++ b/python/flask/app/app.py
@@ -40,6 +40,7 @@ def home():
Emitted some custom metrics!
" -@app.route("/heartbeat") -def heartbeat(): - from appsignal import Heartbeat +@app.route("/cron") +def cron(): + from appsignal.check_in import Cron - with Heartbeat("custom-heartbeat"): + with Cron("custom-cron-checkin"): sleep(3) - return "Sent a heartbeat!
" + return "Sent a cron check-in!
" @app.route("/custom", methods=["GET", "POST"]) def custom(): diff --git a/ruby/sinatra-puma/app/app.rb b/ruby/sinatra-puma/app/app.rb index 377b3582..261f17b2 100644 --- a/ruby/sinatra-puma/app/app.rb +++ b/ruby/sinatra-puma/app/app.rb @@ -13,8 +13,8 @@