alti3/litestar-skills/litestar-metrics
Claude Code and agent skill by alti3/litestar-skills
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Add Litestar metrics with OpenTelemetry and Prometheus instrumentation, plugin or middleware wiring, exporter configuration, path grouping, labels, exemplars, and endpoint exclusion strategy. Use when implementing service-level monitoring, scrape endpoints, request metrics, or custom observability dimensions in Litestar. Do not use for log formatting, tracing-only concerns, or exception contract design.
Install
npx vskill@latest install alti3/litestar-skills/litestar-metricsSKILL.md
The same SKILL.md was published earlier as alti3/litestar-skills/litestar-metrics.
Metrics
Execution Workflow
- Choose the metrics backend first: OpenTelemetry for OTel ecosystem integration or Prometheus for scrape-based metrics exposure.
- Register instrumentation at app scope with the appropriate plugin or middleware.
- Decide which routes, methods, and paths should be excluded from metrics.
- Keep labels low-cardinality and group dynamic paths when needed.
- Add custom dimensions or exemplars only when they materially improve observability.
- 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.
- Keep metrics concerns separate from logs, traces, and exception-response formatting.
Decision Guide
- Use OpenTelemetry when the service already participates in an OTel pipeline or shared collector/exporter setup.
- Use Prometheus when the service should expose a scrape endpoint directly.
- Use Prometheus
group_path=Truewhen route path cardinality could explode. - Use Prometheus labels or OTel resource dimensions only when the values are stable and bounded.
- Use exemplars only when the exposition format and monitoring stack actually support them.
- Use
litestar-loggingand tracing separately when the task is not primarily metrics.
Reference Files
Read only the sections you need:
- For OpenTelemetry plugin setup, provider/exporter expectations, and OTel-focused decisions, read references/open-telemetry-patterns.md.
- For Prometheus middleware, controller wiring, labels, buckets, exemplars, exclusions, and path grouping, read references/prometheus-patterns.md.
Recommended Defaults
- Start with built-in request instrumentation before adding domain-specific metrics.
- Keep labels bounded and documented.
- Exclude metrics endpoints from self-observation only when it helps reduce noise.
- Group dynamic paths when cardinality would otherwise grow with route parameters.
- Keep dashboard and alert assumptions close to the metric definitions they depend on.
Anti-Patterns
- Emitting labels with unbounded values.
- Building dashboards around unstable metric names or label keys.
- Adding metrics middleware or plugins at multiple layers without intent.
- Treating Prometheus and OpenTelemetry as interchangeable without considering the downstream stack.
- Enabling exemplars without openmetrics support.
- Measuring everything before deciding what operators actually need.
Validation Checklist
- Confirm instrumentation is registered exactly once.
- Confirm exporter or scrape endpoint emits baseline request metrics.
- Confirm excluded paths and methods behave as intended.
- Confirm path grouping and label choices keep cardinality under control.
- Confirm custom labels and exemplars are bounded and supported by the stack.
- Confirm dashboards and alerts map to real operational questions.
- Confirm instrumentation overhead is acceptable.
Cross-Skill Handoffs
- Use
litestar-loggingfor event-level diagnostics and structured logs. - Use
litestar-debuggingandlitestar-testingto validate instrumentation assumptions. - Use
litestar-exception-handlingwhen error-contract decisions interact with what metrics should count as failures.
Litestar References
- https://docs.litestar.dev/latest/usage/metrics/index.html
- https://docs.litestar.dev/latest/usage/metrics/open-telemetry.html
- https://docs.litestar.dev/latest/usage/metrics/prometheus.html
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/litestar/skills/litestar-metrics/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/alti3/litestar-skills/litestar-metrics)