{"id":26804820,"url":"https://github.com/throughnothing/plack-middleware-statsd","last_synced_at":"2025-03-29T22:27:15.864Z","repository":{"id":5901445,"uuid":"7120176","full_name":"throughnothing/Plack-Middleware-StatsD","owner":"throughnothing","description":null,"archived":false,"fork":false,"pushed_at":"2014-12-31T18:41:22.000Z","size":167,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-04-14T01:26:35.086Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/throughnothing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-11T22:02:22.000Z","updated_at":"2014-12-31T18:41:24.000Z","dependencies_parsed_at":"2022-09-05T09:30:13.504Z","dependency_job_id":null,"html_url":"https://github.com/throughnothing/Plack-Middleware-StatsD","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/throughnothing%2FPlack-Middleware-StatsD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/throughnothing%2FPlack-Middleware-StatsD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/throughnothing%2FPlack-Middleware-StatsD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/throughnothing%2FPlack-Middleware-StatsD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/throughnothing","download_url":"https://codeload.github.com/throughnothing/Plack-Middleware-StatsD/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246252591,"owners_count":20747771,"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":"2025-03-29T22:27:14.936Z","updated_at":"2025-03-29T22:27:15.851Z","avatar_url":"https://github.com/throughnothing.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nPlack::Middleware::StatsD - Plack middleware for logging request/response data with StatsD\n\n# VERSION\n\nversion 0.0200\n\n# SYNOPSIS\n\n    use Plack::Builder;\n    use Plack::Middleware::StatsD;\n\n    my $app = sub { ... } # as usual\n\n    # StatsD Options\n    my %options = (\n        host =\u003e '127.0.0.1',\n        port =\u003e 8125,\n        sample_rate =\u003e 0.5,\n        prefix =\u003e 'myapp',\n        whitelist =\u003e sub {\n            my ($req) = @_;\n            ...\n            # Return true to process, false to ignore\n        },\n        stat_name_mapper =\u003e sub {\n            my ($req) = @_;\n            ...\n            # Return what to name the stat for this request\n            return $req-\u003epath;\n        },\n    );\n\n    builder {\n        enable \"Plack::Middleware::StatsD\", %options;\n        $app;\n    };\n\nWith the above in place, [Plack::Middleware::StatsD](http://search.cpan.org/perldoc?Plack::Middleware::StatsD) will increment counters to\n`PREFIX.STATUS_CODE` and `PREFIX./url/path.STATUS_CODE` to your statsd server.\n\nIt will also time your responses under `PREFIX./url/path.time` to your statsd\nserver as well.\n\n# AUTHOR\n\nWilliam Wolf \u003cthroughnothing@gmail.com\u003e\n\n# COPYRIGHT AND LICENSE\n\n\n\nWilliam Wolf has dedicated the work to the Commons by waiving all of his\nor her rights to the work worldwide under copyright law and all related or\nneighboring legal rights he or she had in the work, to the extent allowable by\nlaw.\n\nWorks under CC0 do not require attribution. When citing the work, you should\nnot imply endorsement by the author.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthroughnothing%2Fplack-middleware-statsd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthroughnothing%2Fplack-middleware-statsd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthroughnothing%2Fplack-middleware-statsd/lists"}