litestar-metrics

Installation
SKILL.md

Metrics

Execution Workflow

  1. Choose the metrics backend first: OpenTelemetry for OTel ecosystem integration or Prometheus for scrape-based metrics exposure.
  2. Register instrumentation at app scope with the appropriate plugin or middleware.
  3. Decide which routes, methods, and paths should be excluded from metrics.
  4. Keep labels low-cardinality and group dynamic paths when needed.
  5. Add custom dimensions or exemplars only when they materially improve observability.
  6. Validate exporter or scrape behavior before depending on dashboards and alerts.

Core Rules

  • Keep instrumentation centralized at app construction.
  • Prefer backend defaults until concrete monitoring needs justify customization.
  • Avoid high-cardinality labels such as user IDs, request IDs, or raw path values.
  • Exclude noisy or irrelevant paths and methods intentionally.
  • Group dynamic paths to avoid cardinality explosion.
  • Treat metrics naming, units, and label sets as stable contracts.
Related skills

More from alti3/litestar-skills

Installs
14
GitHub Stars
5
First Seen
Mar 2, 2026