From backend
StatsD metric instrumentation: push metrics over UDP, choose the right metric type, name consistently. Invoke whenever task involves any interaction with StatsD metrics — emitting counters, gauges, timers, histograms, sets, or distributions; configuring DogStatsD tags; tuning sampling rates; or integrating with Graphite, Prometheus, or Telegraf backends.
npx claudepluginhub xobotyi/cc-foundry --plugin backendThis skill uses the workspace's default tool permissions.
Choose the right metric type, name it with dot-delimited hierarchy, tag dimensions instead of encoding them in names.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
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 on your application, 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.