Ruby logging and alerts, in 5 minutes
Your Ruby app's errors with their stack trace, each request's thread across your services and a phone alert when an order never finishes. One file, no gems.
- 1
Install
# copy estiaje.rb into your project (Ruby 2.7+)It's a file with no dependencies: copy it from here. Change
"mi-api"to your service's name. - 2
Your key
Create your account and put the key in
ESTIAJE_TOKEN. Or ask your AI “connect this repo to Estiaje” (the connector). Without the key nothing leaves over the network: you can instrument today. - 3
Your errors and each request's thread
● Tested in CI# config/application.rb require_relative "../lib/estiaje" Estiaje.capturar_errores # uncaught errors # …inside class Application: config.middleware.use Estiaje::Middleware # each request's threadrequire_relative "estiaje" Estiaje.capturar_errores # uncaught errors use Estiaje::Middleware # each request's thread# lib/tasks/corte.rake task corte: :environment do Estiaje.empezar_hilo(nil) # a new thread for this job procesar Estiaje.esperar # before exiting, let the sends finish end - 4
The process that must finish
Estiaje.evento("order.paid", { order_id: order.id, amount: order.total }) # … when it ships … Estiaje.evento("order.shipped", { order_id: order.id }, kind: "outcome") - 5
The alert
In the dashboard, under Processes: “every
order.paidexpects itsorder.shipped, byorder_id, within 30 minutes”. If it never comes, you get a phone, email or Slack alert, with the money at risk.
And if you want more
- Errors you catch:
Estiaje.error(e, { order_id: order.id }), with their stack. - When calling another service, pass the thread:
req["traceparent"] = Estiaje.traceparent. - Ruby 2.7+; only
net/httpandjson.
Everything else is in the full docs.
Create account, 14 days of Pro
No card required.