Skip to content
Back to skills

2090 Metrics Collection D316bf08

ASecurity

| Metric | Type | Description | |--------|------|-------------| | `vercel_requests_total` | Counter | Total API requests | | `vercel_request_duration_seconds` | Histogram | Request latency | | `vercel_errors_total` | Counter | Error count by type | | `vercel_rate_limit_remaining` | Gauge | Rate limit headroom |

  • 9 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 11, 2026
developmenttypescriptapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 2090-metrics-collection_d316bf08 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2090 Metrics Collection D316bf08?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 2090 Metrics Collection D316bf08
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-2090-metrics-collection-d316bf08/badge)](https://www.skillsdirectory.com/skills/tools-only-2090-metrics-collection-d316bf08)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Metrics Collection

## Metrics Collection

### Key Metrics
| Metric | Type | Description |
|--------|------|-------------|
| `vercel_requests_total` | Counter | Total API requests |
| `vercel_request_duration_seconds` | Histogram | Request latency |
| `vercel_errors_total` | Counter | Error count by type |
| `vercel_rate_limit_remaining` | Gauge | Rate limit headroom |

### Prometheus Metrics

```typescript
import { Registry, Counter, Histogram, Gauge } from 'prom-client';

const registry = new Registry();

const requestCounter = new Counter({
  name: 'vercel_requests_total',
  help: 'Total Vercel API requests',
  labelNames: ['method', 'status'],
  registers: [registry],
});

const requestDuration = new Histogram({
  name: 'vercel_request_duration_seconds',
  help: 'Vercel request duration',
  labelNames: ['method'],
  buckets: [0.05, 0.1, 0.25, 0.5, 1, 2.5, 5],
  registers: [registry],
});

const errorCounter = new Counter({
  name: 'vercel_errors_total',
  help: 'Vercel errors by type',
  labelNames: ['error_type'],
  registers: [registry],
});
```

### Instrumented Client

```typescript
async function instrumentedRequest<T>(
  method: string,
  operation: () => Promise<T>
): Promise<T> {
  const timer = requestDuration.startTimer({ method });

  try {
    const result = await operation();
    requestCounter.inc({ method, status: 'success' });
    return result;
  } catch (error: any) {
    requestCounter.inc({ method, status: 'error' });
    errorCounter.inc({ error_type: error.code || 'unknown' });
    throw error;
  } finally {
    timer();
  }
}
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.