telemetry-essentials
Installation
SKILL.md
Telemetry Essentials
RULES — Follow these with no exceptions
- Use structured logging (
Logger.info("action", key: value)) — never string interpolation in log messages; structured logs are searchable and parseable - Attach telemetry handlers in
Application.start/2—:telemetry.attach/4with an existing handler ID returns{:error, :already_exists}, so it never double-attaches; attach at boot anyway, since handlers detach permanently if they raise and boot-time attachment gives them a stable lifecycle - Use
Ecto.Repotelemetry events for query monitoring — don't wrap every query manually; Ecto already emits events - Use
Phoenix.LiveDashboardin dev/staging — it's free observability with zero code - Tag telemetry events with metadata (user_id, request_id) — without correlation IDs, distributed traces are useless
- Never log at
:debuglevel in production — it includes query parameters and PII
Structured Logging
Structured logs can be filtered, searched, and aggregated. String-interpolated logs cannot.