StatsD · Schema

StatsD Metric Instance

The parsed, in-memory representation of a single StatsD metric observation after the daemon has parsed a wire-protocol line. Useful for tooling that bridges StatsD into JSON-native sinks (InfluxDB, OpenTelemetry, Kafka).

AggregationDaemonDogStatsDLine ProtocolMetricsObservabilityOpen-SourceStatsDTCPUDPWire Protocol

Properties

Name Type Description
bucket string Dotted-path metric name. Conventional separator is `.`; clients commonly prefix with environment, service, and host.
value number Numeric observation. Signed for delta-style gauges (`+`, `-`). Sets accept arbitrary strings as values — see `setValue`.
setValue string String observation for set-type metrics; tracked for cardinality, not magnitude.
type string Metric type as decoded from the wire-format suffix (`c`, `g`, `ms`, `h`, `s`, `m`, `d`).
wireType string Verbatim wire-protocol type letter.
delta boolean True when a gauge value carried a `+` or `-` prefix (relative adjustment) rather than a replacement value.
sampleRate number Sample rate carried in the `@rate` clause. Daemon scales counter increments by `1/sampleRate` on aggregation.
tags object Tag bag from a DogStatsD/Telegraf `|#k:v,k:v` suffix. Keys are tag names, values are tag values; valueless tags map to an empty string.
timestamp string Server-side ingest timestamp (the wire protocol itself does not carry a timestamp).
host string Sender hostname, populated by tag enrichment in DogStatsD/gostatsd.
View JSON Schema on GitHub

JSON Schema

statsd-metric-instance-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://api-evangelist.github.io/statsd/json-schema/statsd-metric-instance-schema.json",
  "title": "StatsD Metric Instance",
  "description": "The parsed, in-memory representation of a single StatsD metric observation after the daemon has parsed a wire-protocol line. Useful for tooling that bridges StatsD into JSON-native sinks (InfluxDB, OpenTelemetry, Kafka).",
  "type": "object",
  "required": ["bucket", "value", "type"],
  "properties": {
    "bucket": {
      "type": "string",
      "description": "Dotted-path metric name. Conventional separator is `.`; clients commonly prefix with environment, service, and host.",
      "pattern": "^[A-Za-z0-9._:\\-]+$",
      "examples": ["app.requests.completed", "fuel.level", "request.duration"]
    },
    "value": {
      "type": "number",
      "description": "Numeric observation. Signed for delta-style gauges (`+`, `-`). Sets accept arbitrary strings as values — see `setValue`."
    },
    "setValue": {
      "type": "string",
      "description": "String observation for set-type metrics; tracked for cardinality, not magnitude."
    },
    "type": {
      "type": "string",
      "enum": ["counter", "gauge", "timer", "histogram", "set", "meter", "distribution"],
      "description": "Metric type as decoded from the wire-format suffix (`c`, `g`, `ms`, `h`, `s`, `m`, `d`)."
    },
    "wireType": {
      "type": "string",
      "enum": ["c", "g", "ms", "h", "s", "m", "d"],
      "description": "Verbatim wire-protocol type letter."
    },
    "delta": {
      "type": "boolean",
      "description": "True when a gauge value carried a `+` or `-` prefix (relative adjustment) rather than a replacement value."
    },
    "sampleRate": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "description": "Sample rate carried in the `@rate` clause. Daemon scales counter increments by `1/sampleRate` on aggregation."
    },
    "tags": {
      "type": "object",
      "description": "Tag bag from a DogStatsD/Telegraf `|#k:v,k:v` suffix. Keys are tag names, values are tag values; valueless tags map to an empty string.",
      "additionalProperties": {
        "type": "string"
      },
      "examples": [
        {
          "env": "prod",
          "service": "checkout",
          "region": "us-east-1"
        }
      ]
    },
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "description": "Server-side ingest timestamp (the wire protocol itself does not carry a timestamp)."
    },
    "host": {
      "type": "string",
      "description": "Sender hostname, populated by tag enrichment in DogStatsD/gostatsd."
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "bucket": "app.requests.completed",
      "value": 1,
      "type": "counter",
      "wireType": "c",
      "sampleRate": 0.1,
      "timestamp": "2026-05-23T12:00:00Z"
    },
    {
      "bucket": "page.views",
      "value": 1,
      "type": "counter",
      "wireType": "c",
      "tags": {
        "env": "prod",
        "service": "checkout"
      }
    },
    {
      "bucket": "request.duration",
      "value": 320,
      "type": "timer",
      "wireType": "ms"
    }
  ]
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/statsd-metric-instance"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.