Phoenix
Your Phoenix app on Kamal, at a glance.
Request health works with nothing installed. Add the package for migrations and Oban jobs.
With no changes to your app
Every request already passes through kamal-proxy. The observer reads its log and reports a summary each minute. Nothing goes in your release or your deploy config.
- Requests per minute, 5xx error rate, and p95 response time
- Before and after numbers on every deploy receipt
- Server-error alerts that clear when the errors stop
- Host, container, certificate, and HTTP checks
With the upstate_phoenix package
A plug in your endpoint adds what a request log can’t see. Health stays on your server’s private network.
What the package adds
upstate_phoenix
- Pending Ecto migrations after a deploy
- Oban job counts, with alerts for stuck or failing jobs
- Oban cron jobs, ready to accept as check-ins
- Postgres size and growth, connections, oldest transaction
- Phoenix, Elixir, and OTP versions, and when the app booted
What never leaves your app
Request and response bodies, row data, parameters, headers, cookies, SQL, IP addresses, job arguments, job errors, exception messages, and environment variables.
Setup
Generate a token on the project’s App health page, then:
# mix.exs
{:upstate_phoenix, "~> 0.3"}
# endpoint.ex, above Plug.Telemetry
plug UpstatePhoenix.Plug, otp_app: :my_app
# .kamal/secrets
UPSTATE_HEALTH_TOKEN=paste-the-token-here
# config/deploy.yml
env:
secret:
- UPSTATE_HEALTH_TOKEN
Deploy as usual. That’s it. Using force_ssl? Exclude the health path.
Keep your servers. Know when they need you.
Free watches 5 components on up to 3 servers. No card.