application-metrics

Guide for instrumenting applications with metrics. Use when adding observability, monitoring, metrics, counters, gauges, or instrumentation to code. Covers API endpoints, databases, queues, caching, and locks.

16 stars

Best use case

application-metrics is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Guide for instrumenting applications with metrics. Use when adding observability, monitoring, metrics, counters, gauges, or instrumentation to code. Covers API endpoints, databases, queues, caching, and locks.

Teams using application-metrics should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/application-metrics/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/fullstack-web/application-metrics/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/application-metrics/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How application-metrics Compares

Feature / Agentapplication-metricsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Guide for instrumenting applications with metrics. Use when adding observability, monitoring, metrics, counters, gauges, or instrumentation to code. Covers API endpoints, databases, queues, caching, and locks.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Application Metrics Instrumentation

Practical patterns for adding observability to applications.

## Five Metric Types

| Type | Purpose | Example |
|------|---------|---------|
| **Operational Counters** | Track discrete events (success/failure) | `api.requests.success_total` |
| **Resource Utilization** | Current capacity usage (gauges) | `db.connections.active` |
| **Performance/Latency** | Speed with explicit units | `api.request.duration_ms` |
| **Data Volume** | Information flow rates | `queue.messages.bytes_total` |
| **Business Logic** | Domain-specific value | `orders.completed_total` |

## Naming Convention

```
<system>.<component>.<operation>.<metric_type>
```

Examples:
- `myapp.api.users.requests_total`
- `myapp.db.queries.duration_ms`
- `myapp.cache.items.hit_total`

## Component Checklists

### API Endpoints
- Request count by endpoint and method
- Response time (p50, p95, p99)
- Error rate by status code
- Authentication failures
- Request/response payload sizes

### Database
- Connection pool (active, idle, waiting)
- Query duration by operation type
- Slow query count (threshold-based)
- Error count by type (timeout, constraint, connection)
- Transaction commit/rollback rates

### Message Queues
- Messages produced/consumed per topic
- Queue depth (current backlog)
- Processing latency (end-to-end)
- Consumer lag
- Dead letter queue size

### Caching
- Hit/miss ratio
- Eviction count and reason
- Cache size (entries and bytes)
- TTL expiration rate
- Connection pool status

### Locks/Synchronization
- Acquisition time
- Contention count (failed acquisitions)
- Hold duration
- Timeout count
- Deadlock occurrences

## Anti-patterns to Avoid

1. **Unbounded label cardinality** - Never use user IDs, session tokens, or request IDs as labels
2. **Missing failure paths** - Always instrument errors alongside successes
3. **No heartbeat metric** - Add a constant gauge (e.g., `app.up = 1`) to verify instrumentation works
4. **Inconsistent naming** - Stick to one convention across the codebase

## Full Reference

For detailed examples, patterns, and rationale, fetch the complete guide:
https://pierrezemb.fr/posts/practical-guide-to-application-metrics/

Related Skills

applications

16
from diegosouzapw/awesome-omni-skill

Manage and query job applications. Use when the user wants to add, view, update, or analyze their job applications.

application-expert

16
from diegosouzapw/awesome-omni-skill

UseCase 설계, Transaction 경계 관리, CQRS 적용. @Transactional 내 외부 API 호출 금지. /kb-application 명령 시 자동 활성화.

deploying-applications

16
from diegosouzapw/awesome-omni-skill

Deployment patterns from Kubernetes to serverless and edge functions. Use when deploying applications, setting up CI/CD, or managing infrastructure. Covers Kubernetes (Helm, ArgoCD), serverless (Vercel, Lambda), edge (Cloudflare Workers, Deno), IaC (Pulumi, OpenTofu, SST), and GitOps patterns.

azure-mgmt-applicationinsights-dotnet

16
from diegosouzapw/awesome-omni-skill

Azure Application Insights SDK for .NET. Application performance monitoring and observability resource management.

application-logging

16
from diegosouzapw/awesome-omni-skill

Implement structured logging across applications with log aggregation and centralized analysis. Use when setting up application logging, implementing ELK stack, or analyzing application behavior.

agile-metrics

16
from diegosouzapw/awesome-omni-skill

Master agile metrics with velocity, burn-down charts, cycle time, and team health indicators for data-driven improvement.

sentry-setup-metrics

16
from diegosouzapw/awesome-omni-skill

Setup Sentry Metrics in any project. Use this when asked to add Sentry metrics, track custom metrics, setup counters/gauges/distributions, or instrument application performance metrics. Supports JavaScript, TypeScript, Python, React, Next.js, and Node.js.

openapi-to-application-java-spring-boot-openapi-to-application-c

16
from diegosouzapw/awesome-omni-skill

Generate a complete, production-ready application from an OpenAPI specification Use when: the task directly matches openapi to application code responsibilities within plugin openapi-to-application-java-spring-boot. Do not use when: a more specific framework or task-focused skill is clearly a better match.

openapi-to-application-code

16
from diegosouzapw/awesome-omni-skill

Generate a complete, production-ready application from an OpenAPI specification. Use when creating controllers, services, models, and configurations from an OpenAPI/Swagger spec.

dynamic-application-security-testing

16
from diegosouzapw/awesome-omni-skill

Perform dynamic security testing against running web applications and APIs to discover vulnerabilities through active probing and fuzzing.

awesome-copilot-root-openapi-to-application

16
from diegosouzapw/awesome-omni-skill

Expert assistant for generating working applications from OpenAPI specifications Use when: the task directly matches openapi to application responsibilities within plugin awesome-copilot-root. Do not use when: a more specific framework or task-focused skill is clearly a better match.

application-patterns

16
from diegosouzapw/awesome-omni-skill

Common application development patterns and implementations