Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Set up Apollo.io monitoring and observability. Use when implementing logging, metrics, tracing, and alerting for Apollo integrations. Trigger with phrases like "apollo monitoring", "apollo metrics", "apollo observability", "apollo logging", "apollo alerts".
.claude/skills/jeremylongshore-apollo-observability/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 36% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 86% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 55% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 191% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 96% | 0% |
Comprehensive observability for Apollo.io integrations: Prometheus metrics (request count, latency, rate limits, credits), structured logging with PII redaction, OpenTelemetry tracing, and alerting rules. Tracks the metrics that matter: credit burn rate, enrichment success rate, and API health.
typescript// src/observability/metrics.ts import { Counter, Histogram, Gauge, Registry } from 'prom-client'; export const registry = new Registry(); export const requestsTotal = new Counter({ name: 'apollo_requests_total', help: 'Total Apollo API requests by endpoint and status', labelNames: ['endpoint', 'method', 'status'] as const, registers: [registry], }); export const requestDuration = new Histogram({ name: 'apollo_request_duration_seconds', help: 'Apollo API request duration', labelNames: ['endpoint'] as const, buckets: [0.1, 0.25, 0.5, 1, 2.5, 5, 10], registers: [registry], }); export const rateLimitRemaining = new Gauge({ name: 'apollo_rate_limit_remaining', help: 'Remaining requests in current rate limit window', labelNames: ['endpoint'] as const, registers: [registry], }); export const creditsUsed = new Counter({ name: 'apollo_credits_used_total', help: 'Total Apollo enrichment credits consumed', labelNames: ['type'] as const, // 'person', 'organization', 'bulk' registers: [registry], }); export const enrichmentSuccessRate = new Gauge({ name: 'apollo_enrichment_success_rate', help: 'Percentage of enrichment calls that found a match', registers: [registry], });
typescript// src/observability/instrument.ts import { AxiosInstance } from 'axios'; import { requestsTotal, requestDuration, rateLimitRemaining, creditsUsed } from './metrics'; const CREDIT_ENDPOINTS = ['/people/match', '/people/bulk_match', '/organizations/enrich']; export function instrumentClient(client: AxiosInstance) { client.interceptors.request.use((config) => { (config as any)._startTime = Date.now(); return config; }); client.interceptors.response.use( (response) => { const endpoint = response.config.url ?? 'unknown'; const duration = (Date.now() - (response.config as any)._startTime) / 1000; requestsTotal.inc({ endpoint, method: response.config.method?.toUpperCase() ?? 'GET', status: String(response.status) }); requestDuration.observe({ endpoint }, duration); // Rate limit tracking const remaining = response.headers['x-rate-limit-remaining']; if (remaining) rateLimitRemaining.set({ endpoint }, parseInt(remaining, 10)); // Credit tracking if (CREDIT_ENDPOINTS.some((ep) => endpoint.includes(ep))) { const type = endpoint.includes('bulk') ? 'bulk' : endpoint.includes('organization') ? 'organization' : 'person'; const count = response.data?.matches?.length ?? 1; creditsUsed.inc({ type }, count); } return response; }, (err) => { requestsTotal.inc({ endpoint: err.config?.url ?? 'unknown', method: err.config?.method?.toUpperCase() ?? 'GET', status: String(err.response?.status ?? 0), }); return Promise.reject(err); }, ); }
typescript// src/observability/logger.ts import pino from 'pino'; export const logger = pino({ level: process.env.LOG_LEVEL ?? 'info', redact: { paths: ['*.email', '*.phone_numbers', '*.linkedin_url', 'headers.x-api-key'], censor: '[REDACTED]', }, formatters: { level: (label) => ({ level: label }) }, transport: process.env.NODE_ENV !== 'production' ? { target: 'pino-pretty' } : undefined, }); export const apolloLog = logger.child({ service: 'apollo' }); // Usage: // apolloLog.info({ endpoint: '/mixed_people/api_search', results: 25 }, 'Search completed'); // apolloLog.warn({ endpoint: '/people/match', status: 429 }, 'Rate limited'); // apolloLog.error({ err, endpoint: '/contacts' }, 'Request failed');
typescript// src/observability/tracing.ts import { trace, SpanStatusCode } from '@opentelemetry/api'; import { AxiosInstance } from 'axios'; const tracer = trace.getTracer('apollo-integration'); export function addTracing(client: AxiosInstance) { client.interceptors.request.use((config) => { const span = tracer.startSpan(`apollo.${config.method?.toUpperCase()} ${config.url}`); span.setAttribute('apollo.endpoint', config.url ?? ''); (config as any)._span = span; return config; }); client.interceptors.response.use( (response) => { const span = (response.config as any)._span; if (span) { span.setAttribute('http.status_code', response.status); span.setAttribute('apollo.rate_limit_remaining', response.headers['x-rate-limit-remaining'] ?? 'unknown'); span.setStatus({ code: SpanStatusCode.OK }); span.end(); } return response; }, (err) => { const span = (err.config as any)?._span; if (span) { span.setAttribute('http.status_code', err.response?.status ?? 0); span.setStatus({ code: SpanStatusCode.ERROR, message: err.message }); span.end(); } return Promise.reject(err); }, ); }
yaml# prometheus/apollo-alerts.yml groups: - name: apollo-integration rules: - alert: ApolloHighErrorRate expr: rate(apollo_requests_total{status=~"4..|5.."}[5m]) / rate(apollo_requests_total[5m]) > 0.1 for: 5m labels: { severity: critical } annotations: { summary: "Apollo API error rate > 10% for 5 minutes" } - alert: ApolloRateLimitLow expr: apollo_rate_limit_remaining < 20 for: 1m labels: { severity: warning } annotations: { summary: "Apollo rate limit below 20 remaining requests" } - alert: ApolloHighLatency expr: histogram_quantile(0.95, rate(apollo_request_duration_seconds_bucket[5m])) > 5 for: 10m labels: { severity: warning } annotations: { summary: "Apollo p95 latency > 5s for 10 minutes" } - alert: ApolloCreditBurnRate expr: rate(apollo_credits_used_total[1h]) * 24 > 500 for: 30m labels: { severity: warning } annotations: { summary: "Apollo credit burn rate projects > 500/day" }
typescriptimport express from 'express'; import { registry } from './metrics'; const metricsApp = express(); metricsApp.get('/metrics', async (_, res) => { res.set('Content-Type', registry.contentType); res.end(await registry.metrics()); }); metricsApp.get('/health', (_, res) => res.json({ status: 'ok' })); metricsApp.listen(9090, () => console.log('Metrics on :9090'));
/metrics and /health HTTP endpoints| Issue | Resolution | |-------|------------| | Missing metrics | Verify instrumentClient() called before first API call | | Alert noise | Tune for duration and thresholds | | Log volume | Use LOG_LEVEL=warn in production | | Credit burn alert | Review enrichment scoring thresholds in apollo-cost-tuning |
Proceed to apollo-incident-runbook for incident response.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-24 | pass→pass | 20,659 | 19,029 | -8% | 1 | 1 | 0% | 3,500 | 5,739 | +64% | 0 | 0 | — |
case-01 | fail→fail | 24,948 | 17,874 | -28% | 1 | 1 | 0% | 5,961 | 6,672 | +12% | 0 | 0 | — |
case-02 | fail→fail | 13,434 | 11,633 | -13% | 1 | 1 | 0% | 3,118 | 4,928 | +58% | 0 | 0 | — |
case-03 | fail→pass | 18,128 | 15,062 | -17% | 1 | 1 | 0% | 4,414 | 6,023 | +36% | 0 | 0 | — |
case-04 | fail→pass | 10,428 | 6,468 | -38% | 1 | 1 | 0% | 1,842 | 3,424 | +86% | 0 | 0 | — |
case-05 | fail→fail | 12,853 | 6,648 | -48% | 1 | 1 | 0% | 2,518 | 3,563 | +42% | 0 | 0 | — |
case-06 | fail→pass | 10,483 | 5,645 | -46% | 1 | 1 | 0% | 2,142 | 3,319 | +55% | 0 | 0 | — |
case-07 | pass→fail | 21,456 | 8,453 | -61% | 1 | 1 | 0% | 2,247 | 3,916 | +74% | 0 | 0 | — |
case-08 | pass→pass | 9,966 | 2,759 | -72% | 1 | 1 | 0% | 1,893 | 2,870 | +52% | 0 | 0 | — |
case-09 | fail→pass | 5,248 | 3,737 | -29% | 1 | 1 | 0% | 1,000 | 2,914 | +191% | 0 | 0 | — |
case-10 | pass→pass | 12,799 | 6,209 | -51% | 1 | 1 | 0% | 2,402 | 3,432 | +43% | 0 | 0 | — |
case-11 | fail→pass | 6,863 | 2,432 | -65% | 1 | 1 | 0% | 1,342 | 2,632 | +96% | 0 | 0 | — |
case-12 | fail→pass | 10,063 | 4,829 | -52% | 1 | 1 | 0% | 1,856 | 3,016 | +63% | 0 | 0 | — |
case-13 | fail→pass | 11,670 | 5,120 | -56% | 1 | 1 | 0% | 2,205 | 3,018 | +37% | 0 | 0 | — |
case-14 | fail→pass | 8,227 | 2,365 | -71% | 1 | 1 | 0% | 1,462 | 2,551 | +74% | 0 | 0 | — |
case-15 | pass→pass | 5,933 | 3,570 | -40% | 1 | 1 | 0% | 1,226 | 2,951 | +141% | 0 | 0 | — |
case-16 | fail→fail | 9,588 | 5,278 | -45% | 1 | 1 | 0% | 1,980 | 3,221 | +63% | 0 | 0 | — |
case-17 | fail→pass | 32,747 | 4,045 | -88% | 1 | 1 | 0% | 1,458 | 3,058 | +110% | 0 | 0 | — |
case-18 | fail→fail | 6,253 | 5,747 | -8% | 1 | 1 | 0% | 1,213 | 3,414 | +181% | 0 | 0 | — |
case-19 | pass→pass | 5,969 | 4,773 | -20% | 1 | 1 | 0% | 1,333 | 3,251 | +144% | 0 | 0 | — |
case-20 | fail→pass | 14,611 | 9,266 | -37% | 1 | 1 | 0% | 2,612 | 4,257 | +63% | 0 | 0 | — |
case-21 | pass→pass | 8,679 | 3,833 | -56% | 1 | 1 | 0% | 1,576 | 2,930 | +86% | 0 | 0 | — |
case-22 | pass→pass | 16,749 | 16,326 | -3% | 1 | 1 | 0% | 3,244 | 5,514 | +70% | 0 | 0 | — |
case-23 | pass→pass | 17,421 | 18,157 | +4% | 1 | 1 | 0% | 3,069 | 5,923 | +93% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted. The headline lift of +38 percentage points is the difference between those two pass rates over the 24 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.