{"id":17159016,"url":"https://github.com/patricksanders/statsdebug","last_synced_at":"2025-03-24T14:44:52.810Z","repository":{"id":69449501,"uuid":"176598387","full_name":"patricksanders/statsdebug","owner":"patricksanders","description":"Simple service to consume, parse, and debug statsd","archived":false,"fork":false,"pushed_at":"2019-07-10T20:41:25.000Z","size":6791,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T19:32:19.136Z","etag":null,"topics":["debug","statsd","statsd-metrics","statsd-server","statsd-tags","troubleshooting"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patricksanders.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-19T21:06:40.000Z","updated_at":"2022-09-29T12:31:27.000Z","dependencies_parsed_at":"2023-05-10T17:15:33.791Z","dependency_job_id":null,"html_url":"https://github.com/patricksanders/statsdebug","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patricksanders%2Fstatsdebug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patricksanders%2Fstatsdebug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patricksanders%2Fstatsdebug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patricksanders%2Fstatsdebug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patricksanders","download_url":"https://codeload.github.com/patricksanders/statsdebug/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245294705,"owners_count":20591898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debug","statsd","statsd-metrics","statsd-server","statsd-tags","troubleshooting"],"created_at":"2024-10-14T22:13:07.258Z","updated_at":"2025-03-24T14:44:52.783Z","avatar_url":"https://github.com/patricksanders.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CircleCI](https://circleci.com/gh/patricksanders/statsdebug/tree/master.svg?style=svg)](https://circleci.com/gh/patricksanders/statsdebug/tree/master)\n\n# statsdebug\n\nA small service to listen for statsd over UDP, parse the stats, and serve information about the metrics over HTTP.\n\n## Metric Summaries\n\nThe service keeps track of the following for each unique metric name that is reported:\n* `count` - the number of times the metric was sent\n* `tags` - maps unique tag names to a list of the values for each tag. \n* `tag_sets` - provides the number of times that each unique **set** of tags was reported together. This may be useful for \nestimating cardinality: each set of tags corresponds to a unique timeseries\n\n## Running\n\n```bash\n# Run the container\ndocker run --rm -p 8080:8080 -p 8125:8125/udp patricksanders/statsdebug\n\n# Send lots of stats\nfor i in {1..1000}; do printf \"bar.foo.baz:5|c#foo:bar,baz:bang\" | socat -t 0 - UDP:localhost:8125; done\n\n# See what we got!\ncurl localhost:8080/metric/bar.foo.baz | jq .\n# {\n#   \"count\": 1000,\n#   \"tags\": {\n#     \"baz\": [\n#       \"bang\"\n#     ],\n#     \"foo\": [\n#       \"bar\"\n#     ]\n#   },\n#   \"tag_sets\": {\n#     \"baz:bang,foo:bar\": 1000\n#   }\n# }\n\n# Try another metric name\nfor i in {1..500}; do printf \"hello.world:5|c\" | socat -t 0 - UDP:localhost:8125; done\n\n# Get counts for all metrics\ncurl localhost:8080/all | jq .\n# {\n#   \"bar.foo.baz\": 1000,\n#   \"hello.world\": 500\n# }\n\n# Get details about all metrics\ncurl localhost:8080/all/details | jq .\n# {\n#   \"bar.foo.baz\": {\n#     \"count\": 1000,\n#     \"tags\": {\n#       \"baz\": [\n#         \"bang\"\n#       ],\n#       \"foo\": [\n#         \"bar\"\n#       ]\n#     },\n#     \"tag_sets\": {\n#       \"baz:bang,foo:bar\": 1000\n#     }\n#   },\n#   \"hello.world\": {\n#     \"count\": 500,\n#     \"tags\": {},\n#     \"tag_sets\": {\n#       \"\": 500\n#     }\n#   }\n# }\n\n# Reset the count\ncurl localhost:8080/reset\ncurl localhost:8080/all | jq .\n# {}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatricksanders%2Fstatsdebug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatricksanders%2Fstatsdebug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatricksanders%2Fstatsdebug/lists"}