Observability
The template keeps observability simple but not empty.
Structured logging
The process configures log/slog at startup.
- Default level is
info DEBUG=trueraises the level todebug- Startup and shutdown events are logged explicitly
- Bot transport mode and HTTP listener address are logged during runtime start
This gives you enough visibility for local development and for first deployments.
Health and readiness
Two HTTP probe endpoints are available:
/healthzfor liveness/readyzfor Telegram connectivity readiness
The distinction matters:
/healthzanswers whether the process is alive/readyzanswers whether the bot can currently reach Telegram throughGetMe()
That makes readiness more useful than a trivial always-healthy endpoint.
Session backend visibility
The selected session backend appears in:
- The root endpoint response
- The
/sessioncommand output
This is small, but it is useful when verifying whether Redis configuration actually took effect.
What is not included yet
The template does not currently include:
- Prometheus metrics
- OpenTelemetry traces
- Request IDs
- Audit-event persistence
- Alerting integrations
Those are reasonable next additions once the bot grows beyond the starter stage.
Recommended next steps for production observability
- Add metrics around Telegram API failures and handler latency.
- Add tracing if commands call external services.
- Add structured fields that identify handler name and chat scope when operationally safe.