{"id":15639016,"url":"https://github.com/rj/estatsd","last_synced_at":"2025-07-14T08:04:47.694Z","repository":{"id":1518565,"uuid":"1777266","full_name":"RJ/estatsd","owner":"RJ","description":"Erlang stats aggregation app that periodically flushes data to graphite","archived":false,"fork":false,"pushed_at":"2012-05-28T15:39:46.000Z","size":531,"stargazers_count":87,"open_issues_count":2,"forks_count":48,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-07-12T23:46:42.959Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Erlang","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/RJ.png","metadata":{"files":{"readme":"README.txt","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-05-20T16:10:40.000Z","updated_at":"2024-05-04T22:19:58.000Z","dependencies_parsed_at":"2022-08-16T13:35:11.213Z","dependency_job_id":null,"html_url":"https://github.com/RJ/estatsd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RJ/estatsd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RJ%2Festatsd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RJ%2Festatsd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RJ%2Festatsd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RJ%2Festatsd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RJ","download_url":"https://codeload.github.com/RJ/estatsd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RJ%2Festatsd/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265262215,"owners_count":23736407,"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":[],"created_at":"2024-10-03T11:24:22.276Z","updated_at":"2025-07-14T08:04:47.658Z","avatar_url":"https://github.com/RJ.png","language":"Erlang","readme":"estatsd is a simple stats aggregation service that periodically dumps data to\nGraphite: http://graphite.wikidot.com/\n\nNB: Graphite is good, despite the website being a bit ghetto.\n\nInspired heavily by etsy statsd:\nhttp://codeascraft.etsy.com/2011/02/15/measure-anything-measure-everything/\n\nQUICK DEMO\n==========\n\n1) Install and configure graphite (quick-ish)\n2) Install rebar, have it in your path\n3) rebar compile\n4) erl -pa ebin\n5) \u003e application:start(estatsd).\n   \u003e estatsd:increment(foo, 123).\n6) Observe graphite now has 1 data point.\n\nUSAGE\n=====\n\nAdd this app to your rebar deps, and make sure it's started somehow\neg: application:start(estatsd).\n\nYou can configure custom graphite host/port and flush interval using \napplication environment vars. See estatsd_sup for details.\n\nThe following calls to estatsd are all gen_server:cast, ie non-blocking.\n\nGauges\n--------\n\n    estatsd:gauge(temperature, 45).            %% set temperature to 45\n\nCounters\n--------\n\n    estatsd:increment(num_foos).            %% increment num_foos by one\n\n    estatsd:decrement(\u003c\u003c\"num_bars\"\u003e\u003e, 3).   %% decrement num_bars by 3\n\n    estatsd:increment(\"tcp.bytes_in\", 512). %% increment tcp.bytes_in by 512\n\nTimers\n------\n\n    estatsd:timing(sometask, 1534).         %% report that sometask took 1534ms\n\nOr for your convenience: \n\n    Start = erlang:now(),\n    do_sometask(), \n    estatsd:timing(sometast, Start).        %% uses now() and now_diff for you\n\n\n\nNOTES\n=====\n\nThis could be extended to take a callback for reporting mechanisms.\nRight now it's hardcoded to stick data into graphite.\n\nI've been running this since May 2011 in production for irccloud.\n\n\nRichard Jones \u003crj@metabrew.com\u003e\n@metabrew\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frj%2Festatsd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frj%2Festatsd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frj%2Festatsd/lists"}