StatsD Join the chat at https://gitter.im/statsd/statsd Docker Pulls

A network daemon that runs on the Node.js platform and listens for statistics, like counters and timers, sent over UDP or TCP and sends aggregates to one or more pluggable backend services (e.g., Graphite).

Key Concepts

  • buckets

    Each stat is in its own "bucket". They are not predefined anywhere. Buckets can be named anything that will translate to Graphite (periods make folders, etc)

  • values

    Each stat will have a value. How it is interpreted depends on modifiers. In general values should be integers.

  • flush

    After the flush interval timeout (defined by config.flushInterval, default 10 seconds), stats are aggregated and sent to an upstream backend service.

Installation and Configuration

Docker

StatsD supports docker in three ways:

Manual installation

  • Install Node.js (All Current and LTS Node.js versions are supported.)
  • Clone the project
  • Create a config file from exampleConfig.js and put it somewhere
  • Start the Daemon: node stats.js /path/to/config

Usage

The basic line protocol expects metrics to be sent in the format:

<metricname>:<value>|<type>

So the simplest way to send in metrics from your command line if you have StatsD running with the default UDP server on localhost would be:

echo "foo:1|c" | nc -u -w0 127.0.0.1 8125

More Specific Topics

Debugging

There are additional config variables available for debugging:

  • debug - log exceptions and print out more diagnostic info
  • dumpMessages - print debug info on incoming messages

For more information, check the exampleConfig.js.

Tests

A test framework has been added using node-unit and some custom code to start and manipulate StatsD. Please add tests under test/ for any new features or bug fixes encountered. Testing a live server can be tricky, attempts were made to eliminate race conditions but it may be possible to encounter a stuck state. If doing dev work, a killall statsd will kill any stray test servers in the background (don't do this on a production machine!).

Tests can be executed with ./run_tests.sh.

History

StatsD was originally written at Etsy and released with a blog post about how it works and why we created it.

Inspiration

StatsD was inspired (heavily) by the project of the same name at Flickr. Here's a post where Cal Henderson described it in depth: Counting and timing. Cal re-released the code recently: Perl StatsD

statsd/statsd

{
"props": {
"initialPayload": {
"allShortcutsEnabled": false,
"path": "/",
"repo": {
"id": 1207300,
"defaultBranch": "master",
"name": "statsd",
"ownerLogin": "statsd",
"currentUserCanPush": false,
"isFork": false,
"isEmpty": false,
"createdAt": "2010-12-30T00:09:50.000Z",
"ownerAvatar": "https://avatars.githubusercontent.com/u/8270030?v=4",
"public": true,
"private": false,
"isOrgOwned": true
},
"currentUser": null,
"refInfo": {
"name": "master",
"listCacheKey": "v0:1692706579.0",
"canEdit": false,
"refType": "branch",
"currentOid": "7c07eec4e7cebbd376d8313b230cea96c6571423"
},
"tree": {
"items": [
{
"name": ".github/workflows",
"path": ".github/workflows",
"contentType": "directory",
"hasSimplifiedPath": true
},
{
"name": "backends",
"path": "backends",
"contentType": "directory"
},
{
"name": "bin",
"path": "bin",
"contentType": "directory"
},
{
"name": "debian",
"path": "debian",
"contentType": "directory"
},
{
"name": "docs",
"path": "docs",
"contentType": "directory"
},
{
"name": "examples",
"path": "examples",
"contentType": "directory"
},
{
"name": "lib",
"path": "lib",
"contentType": "directory"
},
{
"name": "packager",
"path": "packager",
"contentType": "directory"
},
{
"name": "servers",
"path": "servers",
"contentType": "directory"
},
{
"name": "test",
"path": "test",
"contentType": "directory"
},
{
"name": "utils",
"path": "utils",
"contentType": "directory"
},
{
"name": ".dockerignore",
"path": ".dockerignore",
"contentType": "file"
},
{
"name": ".gitignore",
"path": ".gitignore",
"contentType": "file"
},
{
"name": ".pkgr.yml",
"path": ".pkgr.yml",
"contentType": "file"
},
{
"name": "CODE_OF_CONDUCT.md",
"path": "CODE_OF_CONDUCT.md",
"contentType": "file"
},
{
"name": "CONTRIBUTING.md",
"path": "CONTRIBUTING.md",
"contentType": "file"
},
{
"name": "Changelog.md",
"path": "Changelog.md",
"contentType": "file"
},
{
"name": "DCO.txt",
"path": "DCO.txt",
"contentType": "file"
},
{
"name": "Dockerfile",
"path": "Dockerfile",
"contentType": "file"
},
{
"name": "LICENSE",
"path": "LICENSE",
"contentType": "file"
},
{
"name": "MAINTAINERS.md",
"path": "MAINTAINERS.md",
"contentType": "file"
},
{
"name": "README.md",
"path": "README.md",
"contentType": "file"
},
{
"name": "docker-compose.yml",
"path": "docker-compose.yml",
"contentType": "file"
},
{
"name": "exampleConfig.js",
"path": "exampleConfig.js",
"contentType": "file"
},
{
"name": "exampleProxyConfig.js",
"path": "exampleProxyConfig.js",
"contentType": "file"
},
{
"name": "package-lock.json",
"path": "package-lock.json",
"contentType": "file"
},
{
"name": "package.json",
"path": "package.json",
"contentType": "file"
},
{
"name": "proxy.js",
"path": "proxy.js",
"contentType": "file"
},
{
"name": "run_tests.js",
"path": "run_tests.js",
"contentType": "file"
},
{
"name": "stats.js",
"path": "stats.js",
"contentType": "file"
}
],
"templateDirectorySuggestionUrl": null,
"readme": null,
"totalCount": 30,
"showBranchInfobar": false
},
"fileTree": null,
"fileTreeProcessingTime": null,
"foldersToFetch": [],
"treeExpanded": false,
"symbolsExpanded": false,
"isOverview": true,
"overview": {
"banners": {
"shouldRecommendReadme": false,
"isPersonalRepo": false,
"showUseActionBanner": false,
"actionSlug": null,
"actionId": null,
"showProtectBranchBanner": false,
"recentlyTouchedDataChannel": null,
"publishBannersInfo": {
"dismissActionNoticePath": "/settings/dismiss-notice/publish_action_from_repo",
"releasePath": "/statsd/statsd/releases/new?marketplace=true",
"showPublishActionBanner": false
},
"interactionLimitBanner": null,
"showInvitationBanner": false,
"inviterName": null
},
"codeButton": {
"contactPath": "/contact",
"isEnterprise": false,
"local": {
"protocolInfo": {
"httpAvailable": true,
"sshAvailable": null,
"httpUrl": "https://github.com/statsd/statsd.git",
"showCloneWarning": null,
"sshUrl": null,
"sshCertificatesRequired": null,
"sshCertificatesAvailable": null,
"ghCliUrl": "gh repo clone statsd/statsd",
"defaultProtocol": "http",
"newSshKeyUrl": "/settings/ssh/new",
"setProtocolPath": "/users/set_protocol"
},
"platformInfo": {
"cloneUrl": "https://desktop.github.com",
"showVisualStudioCloneButton": false,
"visualStudioCloneUrl": "https://windows.github.com",
"showXcodeCloneButton": false,
"xcodeCloneUrl": "https://developer.apple.com",
"zipballUrl": "/statsd/statsd/archive/refs/heads/master.zip"
}
},
"newCodespacePath": "/codespaces/new?hide_repo_select=true&repo=1207300"
},
"popovers": {
"rename": null,
"renamedParentRepo": null
},
"commitCount": "1,038",
"overviewFiles": [
{
"displayName": "README.md",
"repoName": "statsd",
"refName": "master",
"path": "README.md",
"preferredFileType": "readme",
"tabName": "README",
"richText": "<article class=\"markdown-body entry-content container-lg\" itemprop=\"text\"><h1 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-statsd--\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#statsd--\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>StatsD <a href=\"https://gitter.im/statsd/statsd?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/15948e5be70feb316221927a7efe7abe322803ffaa1ed60a27ca87e097320da2/68747470733a2f2f6261646765732e6769747465722e696d2f7374617473642f7374617473642e737667\" alt=\"Join the chat at https://gitter.im/statsd/statsd\" data-canonical-src=\"https://badges.gitter.im/statsd/statsd.svg\" style=\"max-width: 100%;\"></a> <a href=\"https://hub.docker.com/r/statsd/statsd\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/ecee4cc0632b58655f9eac9e4466f40ec7a7a40642dc4237219b1d93fea739d9/68747470733a2f2f696d672e736869656c64732e696f2f646f636b65722f70756c6c732f7374617473642f737461747364\" alt=\"Docker Pulls\" data-canonical-src=\"https://img.shields.io/docker/pulls/statsd/statsd\" style=\"max-width: 100%;\"></a></h1>\n<p dir=\"auto\">A network daemon that runs on the <a href=\"http://nodejs.org\" rel=\"nofollow\">Node.js</a> platform and\nlistens for statistics, like counters and timers, sent over <a href=\"http://en.wikipedia.org/wiki/User_Datagram_Protocol\" rel=\"nofollow\">UDP</a> or\n<a href=\"http://en.wikipedia.org/wiki/Transmission_Control_Protocol\" rel=\"nofollow\">TCP</a> and sends aggregates to one or more pluggable backend services (e.g.,\n<a href=\"http://graphite.readthedocs.org/\" rel=\"nofollow\">Graphite</a>).</p>\n<h2 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-key-concepts\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#key-concepts\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Key Concepts</h2>\n<ul dir=\"auto\">\n<li>\n<p dir=\"auto\"><em>buckets</em></p>\n<p dir=\"auto\">Each stat is in its own \"bucket\". They are not predefined anywhere. Buckets\ncan be named anything that will translate to Graphite (periods make folders,\netc)</p>\n</li>\n<li>\n<p dir=\"auto\"><em>values</em></p>\n<p dir=\"auto\">Each stat will have a value. How it is interpreted depends on modifiers. In\ngeneral values should be integers.</p>\n</li>\n<li>\n<p dir=\"auto\"><em>flush</em></p>\n<p dir=\"auto\">After the flush interval timeout (defined by <code>config.flushInterval</code>,\ndefault 10 seconds), stats are aggregated and sent to an upstream backend service.</p>\n</li>\n</ul>\n<h2 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-installation-and-configuration\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#installation-and-configuration\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Installation and Configuration</h2>\n<h3 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-docker\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#docker\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Docker</h3>\n<p dir=\"auto\">StatsD supports docker in three ways:</p>\n<ul dir=\"auto\">\n<li>The official container image on <a href=\"https://github.com/statsd/statsd/pkgs/container/statsd\">GitHub Container Registry</a></li>\n<li>The official container image on <a href=\"https://hub.docker.com/r/statsd/statsd\" rel=\"nofollow\">DockerHub</a></li>\n<li>Building the image from the bundled <a href=\"/statsd/statsd/blob/master/Dockerfile\">Dockerfile</a></li>\n</ul>\n<h3 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-manual-installation\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#manual-installation\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Manual installation</h3>\n<ul dir=\"auto\">\n<li>Install Node.js (All <a href=\"https://nodejs.org/en/about/releases/\" rel=\"nofollow\"><code>Current</code> and <code>LTS</code> Node.js versions</a> are supported.)</li>\n<li>Clone the project</li>\n<li>Create a config file from <code>exampleConfig.js</code> and put it somewhere</li>\n<li>Start the Daemon:\n<code>node stats.js /path/to/config</code></li>\n</ul>\n<h2 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-usage\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#usage\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Usage</h2>\n<p dir=\"auto\">The basic line protocol expects metrics to be sent in the format:</p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"&lt;metricname&gt;:&lt;value&gt;|&lt;type&gt;\"><pre class=\"notranslate\"><code>&lt;metricname&gt;:&lt;value&gt;|&lt;type&gt;\n</code></pre></div>\n<p dir=\"auto\">So the simplest way to send in metrics from your command line if you have\nStatsD running with the default UDP server on localhost would be:</p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"echo &quot;foo:1|c&quot; | nc -u -w0 127.0.0.1 8125\"><pre class=\"notranslate\"><code>echo \"foo:1|c\" | nc -u -w0 127.0.0.1 8125\n</code></pre></div>\n<h2 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-more-specific-topics\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#more-specific-topics\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>More Specific Topics</h2>\n<ul dir=\"auto\">\n<li><a href=\"https://github.com/statsd/statsd/blob/master/docs/metric_types.md\">Metric Types</a></li>\n<li><a href=\"https://github.com/statsd/statsd/blob/master/docs/graphite.md\">Graphite Integration</a></li>\n<li><a href=\"https://github.com/statsd/statsd/blob/master/docs/server.md\">Supported Servers</a></li>\n<li><a href=\"https://github.com/statsd/statsd/blob/master/docs/backend.md\">Supported Backends</a></li>\n<li><a href=\"https://github.com/statsd/statsd/blob/master/docs/admin_interface.md\">Admin TCP Interface</a></li>\n<li><a href=\"https://github.com/statsd/statsd/blob/master/docs/server_interface.md\">Server Interface</a></li>\n<li><a href=\"https://github.com/statsd/statsd/blob/master/docs/backend_interface.md\">Backend Interface</a></li>\n<li><a href=\"https://github.com/etsy/statsd/blob/master/docs/namespacing.md\">Metric Namespacing</a></li>\n<li><a href=\"https://github.com/etsy/statsd/blob/master/docs/cluster_proxy.md\">StatsD Cluster Proxy</a></li>\n</ul>\n<h2 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-debugging\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#debugging\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Debugging</h2>\n<p dir=\"auto\">There are additional config variables available for debugging:</p>\n<ul dir=\"auto\">\n<li><code>debug</code> - log exceptions and print out more diagnostic info</li>\n<li><code>dumpMessages</code> - print debug info on incoming messages</li>\n</ul>\n<p dir=\"auto\">For more information, check the <code>exampleConfig.js</code>.</p>\n<h2 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-tests\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#tests\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Tests</h2>\n<p dir=\"auto\">A test framework has been added using node-unit and some custom code to start\nand manipulate StatsD. Please add tests under test/ for any new features or bug\nfixes encountered. Testing a live server can be tricky, attempts were made to\neliminate race conditions but it may be possible to encounter a stuck state. If\ndoing dev work, a <code>killall statsd</code> will kill any stray test servers in the\nbackground (don't do this on a production machine!).</p>\n<p dir=\"auto\">Tests can be executed with <code>./run_tests.sh</code>.</p>\n<h2 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-history\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#history\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>History</h2>\n<p dir=\"auto\">StatsD was originally written at <a href=\"http://www.etsy.com\" rel=\"nofollow\">Etsy</a> and released with a\n<a href=\"https://codeascraft.etsy.com/2011/02/15/measure-anything-measure-everything/\" rel=\"nofollow\">blog post</a> about how it works and why we created it.</p>\n<h2 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-inspiration\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#inspiration\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Inspiration</h2>\n<p dir=\"auto\">StatsD was inspired (heavily) by the project of the same name at Flickr.\nHere's a post where Cal Henderson described it in depth:\n<a href=\"http://code.flickr.com/blog/2008/10/27/counting-timing/\" rel=\"nofollow\">Counting and timing</a>.\nCal re-released the code recently:\n<a href=\"https://github.com/iamcal/Flickr-StatsD\">Perl StatsD</a></p>\n</article>",
"loaded": true,
"timedOut": false,
"errorMessage": null,
"headerInfo": {
"toc": [
{
"level": 1,
"text": "StatsD ",
"anchor": "statsd--",
"htmlText": "StatsD "
},
{
"level": 2,
"text": "Key Concepts",
"anchor": "key-concepts",
"htmlText": "Key Concepts"
},
{
"level": 2,
"text": "Installation and Configuration",
"anchor": "installation-and-configuration",
"htmlText": "Installation and Configuration"
},
{
"level": 3,
"text": "Docker",
"anchor": "docker",
"htmlText": "Docker"
},
{
"level": 3,
"text": "Manual installation",
"anchor": "manual-installation",
"htmlText": "Manual installation"
},
{
"level": 2,
"text": "Usage",
"anchor": "usage",
"htmlText": "Usage"
},
{
"level": 2,
"text": "More Specific Topics",
"anchor": "more-specific-topics",
"htmlText": "More Specific Topics"
},
{
"level": 2,
"text": "Debugging",
"anchor": "debugging",
"htmlText": "Debugging"
},
{
"level": 2,
"text": "Tests",
"anchor": "tests",
"htmlText": "Tests"
},
{
"level": 2,
"text": "History",
"anchor": "history",
"htmlText": "History"
},
{
"level": 2,
"text": "Inspiration",
"anchor": "inspiration",
"htmlText": "Inspiration"
}
],
"siteNavLoginPath": "/login?return_to=https%3A%2F%2Fgithub.com%2Fstatsd%2Fstatsd"
}
},
{
"displayName": "CODE_OF_CONDUCT.md",
"repoName": "statsd",
"refName": "master",
"path": "CODE_OF_CONDUCT.md",
"preferredFileType": "code_of_conduct",
"tabName": "Code of conduct",
"richText": null,
"loaded": false,
"timedOut": false,
"errorMessage": null,
"headerInfo": {
"toc": null,
"siteNavLoginPath": "/login?return_to=https%3A%2F%2Fgithub.com%2Fstatsd%2Fstatsd"
}
},
{
"displayName": "LICENSE",
"repoName": "statsd",
"refName": "master",
"path": "LICENSE",
"preferredFileType": "license",
"tabName": "MIT",
"richText": null,
"loaded": false,
"timedOut": false,
"errorMessage": null,
"headerInfo": {
"toc": null,
"siteNavLoginPath": "/login?return_to=https%3A%2F%2Fgithub.com%2Fstatsd%2Fstatsd"
}
}
],
"overviewFilesProcessingTime": 15.821745000000002
}
},
"appPayload": {
"helpUrl": "https://docs.github.com",
"findFileWorkerPath": "/assets-cdn/worker/find-file-worker-32bb159cc57c.js",
"findInFileWorkerPath": "/assets-cdn/worker/find-in-file-worker-c6704d501c10.js",
"githubDevUrl": null,
"enabled_features": {
"code_nav_ui_events": false,
"copilot_conversational_ux": false,
"copilot_conversational_ux_embedding_update": false,
"copilot_popover_file_editor_header": false,
"copilot_smell_icebreaker_ux": true,
"copilot_workspace": false,
"codeview_firefox_inert": true
}
}
}
}
{
"accept-ranges": "bytes",
"cache-control": "max-age=0, private, must-revalidate",
"content-encoding": "gzip",
"content-security-policy": "default-src 'none'; base-uri 'self'; child-src github.com/assets-cdn/worker/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com api.githubcopilot.com objects-origin.githubusercontent.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.com/assets-cdn/worker/ gist.github.com/assets-cdn/worker/",
"content-type": "text/html; charset=utf-8",
"date": "Mon, 26 Feb 2024 11:05:31 GMT",
"etag": "b2c62c0cee5264f3e1b00723c8eb5dd4",
"referrer-policy": "no-referrer-when-downgrade",
"server": "GitHub.com",
"set-cookie": "logged_in=no; Path=/; Domain=github.com; Expires=Wed, 26 Feb 2025 11:05:30 GMT; HttpOnly; Secure; SameSite=Lax",
"strict-transport-security": "max-age=31536000; includeSubdomains; preload",
"transfer-encoding": "chunked",
"vary": "X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, Accept-Encoding, Accept, X-Requested-With",
"x-content-type-options": "nosniff",
"x-frame-options": "deny",
"x-github-request-id": "85A4:5F85:1AF7E66:262E49F:65DC707A",
"x-xss-protection": "0"
}