mohitagw15856/pm-claude-skills/monitoring-setup-guide

Claude Code and agent skill by mohitagw15856/pm-claude-skills

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Write a monitoring setup guide for a service — defining what to measure, how to alert on it, and how to build the observability stack covering the four golden signals, business metrics, log strategy, distributed tracing, alerting rules, dashboard layout, and observability debt. Use when asked to set up monitoring for a service, define alerting strategy, write an observability plan, create a dashboard specification, or document logging standards for a team. Produces a metric definitions table, a…

Install

npx vskill@latest install mohitagw15856/pm-claude-skills/monitoring-setup-guide

SKILL.md

The same SKILL.md was published earlier as mohitagw15856/pm-claude-skills/monitoring-setup-guide.

Monitoring Setup Guide Skill

Produce a complete monitoring setup guide for a service — defining exactly what to measure, how to structure logs, how to configure alerts with actionable thresholds, and how to build dashboards that answer real operational questions. A good monitoring guide eliminates "we don't know what's happening in production" as a root cause category, and gives on-call engineers a single source of truth for what healthy looks like.

Required Inputs

Ask for these if not already provided:

  • Service name and description — what the service does and its role in the system
  • Tech stack — language, framework, and infrastructure (e.g. Go/gRPC on Kubernetes, Python/FastAPI on ECS)
  • Current monitoring tooling — Datadog, Prometheus + Grafana, CloudWatch, New Relic, Honeycomb, or none yet
  • Key user journeys — the 2–4 most important things a user or consumer does with the service (these drive what to alert on)
  • Existing alerts — paste any existing alert configurations or describe what's currently monitored

Output Format


Monitoring Setup Guide: [Service Name]

Team: [Team name] | Tech lead: [Name] Stack: [Language/Framework] on [Infrastructure] Monitoring platform: [Datadog / Prometheus+Grafana / CloudWatch / etc.] Date: [Date] | Review cycle: Quarterly


1. Monitoring Philosophy

Good monitoring answers three questions:

  1. Is the service healthy right now? (alerting)
  2. Was it healthy in the past, and is it trending worse? (dashboards + SLO tracking)
  3. Why did something fail? (logs + traces)

This guide defines the answers for [Service Name]. Every alert must be actionable — if an on-call engineer cannot take a specific action in response to the alert, the alert should not exist.

Key user journeys monitored:

  • Journey 1: [e.g. "User submits a payment — POST /charges, receives confirmation"]
  • Journey 2: [e.g. "User views transaction history — GET /transactions"]
  • Journey 3: [e.g. "Subscription renewal job runs — background worker processes billing events"]

2. The Four Golden Signals

Apply the four golden signals specifically to [Service Name]:

Latency

Latency measures how long requests take to complete. Track it separately for successful and failed requests — slow failures hide behind fast errors if you only measure aggregate latency.

MetricDescriptionSourceDimensions
[service].request.duration_msEnd-to-end request latencyApplication instrumentationendpoint, method, status_code
[service].db.query_duration_msDatabase query latencyORM / query instrumentationquery_name, table
[service].external.request_duration_msOutbound call latency to dependenciesHTTP client instrumentationtarget_service, endpoint
[service].queue.processing_duration_msTime to process one message (if applicable)Consumer instrumentationqueue_name, message_type

Latency SLO targets:

Endpoint / operationp50 targetp95 targetp99 target
GET /api/v1/[resource]< [50] ms< [200] ms< [500] ms
POST /api/v1/[resource]< [100] ms< [400] ms< [1000] ms
GET /health< [10] ms< [20] ms< [50] ms
[Background job name]< [5] sec< [15] sec< [60] sec
Traffic

Traffic measures demand on the system. Use it to detect unexpected spikes, traffic drops (which can indicate upstream failures), and to capacity-plan.

MetricDescriptionSource
[service].request.countRequests per secondApplication / load balancer
[service].request.count_by_endpointRPS broken down by endpointApplication
[service].queue.messages_consumed_per_secondConsumer throughputQueue consumer
[service].queue.depthMessages waiting in queueQueue metrics

Traffic baselines (update after observing production for 2+ weeks):

Time periodExpected RPSLow-traffic floorSpike ceiling
Peak (weekday business hours)[N] RPS[N × 0.5] RPS[N × 5] RPS
Off-peak (nights/weekends)[N × 0.2] RPS[N × 0.05] RPS[N] RPS
Errors

Errors measure the fraction of requests that fail. Distinguish between client errors (4xx — caller is doing something wrong) and server errors (5xx — the service is broken).

MetricDescriptionAlert on?
[service].request.error_rate5xx errors / total requestsYes — see alert rules
[service].request.client_error_rate4xx errors / total requestsThreshold alert — sudden spike may indicate API misuse
[service].dependency.error_rateErrors calling downstream dependenciesYes — upstream health signal
[service].queue.dlq_depthMessages in dead-letter queueYes — indicates processing failures
Saturation

Saturation measures how "full" the service is — how close to maximum capacity are the constrained resources.

ResourceMetricAlert thresholdSource
CPU[service].cpu.utilisation_pct>80% sustained 5 minContainer / VM metrics
Memory[service].memory.utilisation_pct>85% sustained 5 minContainer / VM metrics
DB connections[service].db.connection_pool.utilisation_pct>75%Application / DB metrics
Thread pool / goroutines[service].runtime.goroutine_count / thread_count>N (establish baseline)Runtime metrics
Disk (if applicable)[service].disk.utilisation_pct>75%Infrastructure
Queue depth (if applicable)[service].queue.depth>[backlog threshold]Queue metrics

3. Business Metrics

Beyond the golden signals, track metrics that measure whether the service is delivering business value. These matter for SLO reporting and product dashboards.

MetricDescriptionSourceAlert?
[service].[primary_action].success_rate[e.g. "Payment success rate"]ApplicationYes — if drops >5% vs 1h average
[service].[primary_action].count[e.g. "Payments processed per minute"]ApplicationYes — sudden drop (traffic anomaly)
[service].[resource].created_per_hour[e.g. "New accounts created"]Application / DBNo — informational
[service].cache.hit_rateFraction of requests served from cacheCache instrumentationYes — if drops below [60]%
[service].job.[name].success_rate[Background job success rate]Job frameworkYes — if drops below [99]%

4. Log Strategy

Structured Logging Schema

All logs must be structured JSON. Do not emit unstructured text logs in production. Every log line must include the mandatory fields.

Mandatory fields (every log line):

json
{
"timestamp": "2024-01-15T10:23:45.123Z",
"level": "info",
"service": "[service-name]",
"version": "[git-sha-short]",
"trace_id": "[uuid-from-request-context]",
"span_id": "[span-uuid]",
"request_id": "[uuid-per-request]",
"message": "[human readable description]"
}

Request log (emit for every HTTP request):

json
{
"timestamp": "...",
"level": "info",
"service": "[service-name]",
"event": "http_request",
"method": "POST",
"path": "/api/v1/[resource]",
"status_code": 201,
"duration_ms": 45,
"user_id": "[uuid — DO NOT log PII directly]",
"request_id": "[uuid]",
"trace_id": "[uuid]"
}

Error log (emit for every error with context):

json
{
"timestamp": "...",
"level": "error",
"service": "[service-name]",
"event": "error",
"error_code": "[application-error-code]",
"error_message": "[description — no sensitive data]",
"stack_trace": "[stack trace]",
"request_id": "[uuid]",
"trace_id": "[uuid]",
"context": {
"[key]": "[relevant context without PII]"
}
}
Log Levels — When to Use Each
LevelUse whenExample
errorSomething failed that requires attention — this should page on-call eventuallyDatabase query failed, external API returned 5xx, required config missing
warnSomething unexpected happened but service is still functioningRetry succeeded after failure, cache miss on expected hit, rate limit approaching
infoSignificant business events and request lifecycleRequest received, payment processed, user authenticated, job started/completed
debugDetailed diagnostic information — off in production by defaultQuery parameters, intermediate computation results, cache key lookups
What NOT to Log

Never log:

  • Passwords, tokens, API keys, or secrets (even hashed)
  • Full credit card numbers or PAN data
  • Social security numbers or government IDs
  • Full names + dates of birth + contact info in the same log line (PII aggregation)
  • Request/response bodies in full (use field-level extraction instead)
  • Health check requests (too noisy — exclude GET /health from access logs)

5. Distributed Tracing Setup

Distributed tracing is mandatory for any service that calls other services. It enables root-cause analysis across service boundaries.

Instrumentation Checklist
[ ] Tracing library installed:
- Go: go.opentelemetry.io/otel
- Python: opentelemetry-sdk, opentelemetry-instrumentation
- Node: @opentelemetry/sdk-node
- Java: opentelemetry-java-instrumentation
[ ] Tracer initialized at service startup with service name and version
[ ] Trace context propagated via W3C Trace Context headers:
traceparent: 00-[trace-id]-[span-id]-01
tracestate: [optional vendor-specific]
[ ] Automatic instrumentation enabled for:
[ ] Inbound HTTP/gRPC requests (creates root span)
[ ] Outbound HTTP/gRPC calls (creates child spans)
[ ] Database queries (creates child spans with sanitized query)
[ ] Cache operations (Redis, Memcached)
[ ] Message queue produce/consume
[ ] Custom spans added for:
[ ] Key business operations ([e.g. payment processing, user lookup])
[ ] Background jobs (each job execution = root span)
[ ] Third-party API calls with custom attributes
[ ] Span attributes to capture on all spans:
- user.id (if authenticated — no PII)
- deployment.environment (production/staging)
- service.version (git SHA)
- [service-specific key attributes]
[ ] Trace exporter configured to: [Datadog / Jaeger / Tempo / OTLP endpoint]
[ ] Sampling rate configured:
- Production: [1–10]% of requests (adjust based on volume and cost)
- Always sample: errors, slow requests (>p99 threshold), and 100% of [critical endpoint]
Trace Instrumentation Examples
python
# Python — OpenTelemetry example
from opentelemetry import trace
tracer = trace.get_tracer("[service-name]")
def process_payment(payment_data):
with tracer.start_as_current_span("process_payment") as span:
span.set_attribute("payment.amount_cents", payment_data["amount"])
span.set_attribute("payment.currency", payment_data["currency"])
# Never: span.set_attribute("payment.card_number", ...)
try:
result = _do_process(payment_data)
span.set_status(trace.StatusCode.OK)
return result
except PaymentError as e:
span.set_status(trace.StatusCode.ERROR, str(e))
span.record_exception(e)
raise

6. Alert Rules Specification

Every alert must have: a name, a condition, a threshold, a severity, and a clear on-call action. Alerts without a clear action should not exist.

Alert Definitions

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 96 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
1,503
Repository forks
264
7-day trend score
35

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 7 Jul 2026, 4 months ago.

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/mohitagw15856/pm-claude-skills/monitoring-setup-guide/badge)](https://verified-skill.com/skills/mohitagw15856/pm-claude-skills/monitoring-setup-guide)

Something wrong with this skill or its page? Tell us.