/backend:statsdfrom backend
Guides StatsD metric instrumentation including metric type selection, naming conventions, DogStatsD tags, sampling rates, and backend integrations.
Ships in backend. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Choose the right metric type, name it with dot-delimited hierarchy, tag dimensions instead of encoding them in names. StatsD is fire-and-forget: UDP means zero latency impact, but wrong metric types or bad naming corrupt your data silently.
${CLAUDE_SKILL_DIR}/references/metric-types.md]: Wire format details, type comparison, sampling
correction${CLAUDE_SKILL_DIR}/references/naming.md]: Graphite namespace mapping, character rules, naming
examples${CLAUDE_SKILL_DIR}/references/dogstatsd.md]: Events format, service checks, protocol versions,
distributions vs histograms${CLAUDE_SKILL_DIR}/references/aggregation.md]: Flush mechanics, Graphite downsampling, DogStatsD
aggregation, timestamps${CLAUDE_SKILL_DIR}/references/client-patterns.md]: High-throughput tuning, error handling,
K8s deployment, UDS configuration${CLAUDE_SKILL_DIR}/references/backends.md]: statsd_exporter config, Telegraf setup, migration
guidesWire format: <metric_name>:<value>|<type>[|@<sample_rate>][|#<tags>]
| Question | Type |
|---|---|
| How many times did X happen? | Counter (c) |
| What is X right now? | Gauge (g) |
| How long did X take? | Timer (ms) |
| What is the distribution of X? | Histogram (h) |
| How many unique X occurred? | Set (s) |
| What is the global distribution of X? | Distribution (d, DogStatsD only) |
Wrong metric type = wrong math at the server. A gauge used as a counter loses data between flushes; a counter used as a gauge produces meaningless rates.
|c)Measures rate of events over time. Server sums all values during flush interval, resets to 0 after flush, reports both raw count and per-second rate.
1/rate|@<rate>)|g)Instantaneous value at a point in time. Server stores last value received, retains between flushes (sticky).
+N, -N) modify current value incrementally|ms)Duration of an operation in milliseconds. Server computes per flush interval: count, mean, upper (max), lower (min), sum, stddev, median, configurable percentiles (p90, p95, p99).
|@<rate>)|h)Distribution of values over time. Identical to timer in most implementations. DogStatsD treats histograms as the native distribution type.
|s)Count of unique values per flush interval. Server tracks distinct values, reports cardinality at flush, resets.
|d) — DogStatsD OnlyGlobal distribution across all hosts. Raw values sent to Datadog servers (not aggregated locally). Use when you need accurate fleet-wide percentiles.
See ${CLAUDE_SKILL_DIR}/references/dogstatsd.md for distributions vs histograms comparison and protocol version
details.
Format: <namespace>.<subsystem>.<target>.<metric>.<unit>
Example: myapp.api.request.duration.ms, myapp.cache.hit.count.total
myapp.api.requests not just requests.ms, .bytes, .total, .itemshttp_request not httpRequestSee ${CLAUDE_SKILL_DIR}/references/naming.md for Graphite namespace mapping, character rules table, and naming
anti-patterns.
Format: metric.name:1|c|#key1:value1,key2:value2 — comma-separated, no spaces.
region:us_eastSet these as global/constant tags on the client — attach to every metric automatically:
env — Deployment environment (env:production)service — Service name (service:payment-api)version — Deployed version (version:2.1.0)Rule of thumb: if a tag can have >1000 distinct values, do not use it. Use logs or traces for high-cardinality data.
env:production — ~3-5 values: Yesmethod:GET — ~7 values: Yesstatus_code:200 — ~20-50 values: Yesendpoint:/api/users — ~50-200 values: Cautionuser_id:12345 — Unbounded: NoThe flush cycle determines metric resolution. Default: 10 seconds.
deleteCounters config (default: send 0)See ${CLAUDE_SKILL_DIR}/references/aggregation.md for flush mechanics, Graphite downsampling rules, DogStatsD
aggregation details, and pre-aggregated timestamps.
Enable client-side buffering — packs multiple metrics into single UDP packets. Reduces syscall overhead in hot paths.
Most modern DogStatsD clients buffer by default. Call flush() before shutdown.
Client randomly decides whether to send each metric based on sample rate. Datagram includes |@<rate> so server
corrects the count.
rate=1.0 (no sampling)rate=0.5 to 0.1 for counters/timersrate=0.1 or lower; enable client-side aggregationNever sample gauges or sets — server cannot correct for these types.
See ${CLAUDE_SKILL_DIR}/references/client-patterns.md for high-throughput tuning steps, error handling, and Kubernetes
deployment patterns.
See ${CLAUDE_SKILL_DIR}/references/backends.md for statsd_exporter configuration, Telegraf setup, and migration
guides.
When writing StatsD instrumentation:
When reviewing StatsD instrumentation:
The coding skill governs workflow; this skill governs StatsD instrumentation choices.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub xobotyi/cc-foundry --plugin backend4 skills in this plugin
/observabilityObservability discipline: structured logging, metrics instrumentation, distributed tracing, and signal correlation. Invoke whenever task involves any interaction with observability concerns — adding logging, designing metrics, instrumenting traces, correlating signals, reviewing instrumentation, or understanding when to use which pillar./otel-tracingOpenTelemetry tracing discipline: correct spans, propagation, and semantic conventions produce useful traces. Invoke whenever task involves any interaction with distributed tracing — span creation, context propagation, instrumentation, sampling configuration, or OpenTelemetry SDK setup./prometheusPrometheus instrumentation discipline: right metric type, right name, right labels. Invoke whenever task involves any interaction with Prometheus metrics — instrumenting application code, writing PromQL queries, defining alerting or recording rules, choosing metric types, managing label cardinality, building exporters, or reviewing monitoring configuration.Other plugins' skills for the same job