{"id":15650418,"url":"https://github.com/phstc/sidekiq-statsd","last_synced_at":"2025-10-24T13:29:34.320Z","repository":{"id":55969689,"uuid":"10232849","full_name":"phstc/sidekiq-statsd","owner":"phstc","description":"Sidekiq StatsD is a Sidekiq server middleware to send Sidekiq worker metrics through statsd.","archived":false,"fork":false,"pushed_at":"2020-12-03T00:45:47.000Z","size":6638,"stargazers_count":36,"open_issues_count":2,"forks_count":25,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-02T13:31:42.107Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/phstc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-23T00:44:32.000Z","updated_at":"2023-01-31T19:33:42.000Z","dependencies_parsed_at":"2022-08-15T10:31:22.357Z","dependency_job_id":null,"html_url":"https://github.com/phstc/sidekiq-statsd","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phstc%2Fsidekiq-statsd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phstc%2Fsidekiq-statsd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phstc%2Fsidekiq-statsd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phstc%2Fsidekiq-statsd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phstc","download_url":"https://codeload.github.com/phstc/sidekiq-statsd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232654826,"owners_count":18556470,"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-03T12:34:34.118Z","updated_at":"2025-10-24T13:29:34.227Z","avatar_url":"https://github.com/phstc.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sidekiq::Statsd\n\n[![Build Status](https://secure.travis-ci.org/phstc/sidekiq-statsd.png)](http://travis-ci.org/phstc/sidekiq-statsd)\n[![Dependency Status](https://gemnasium.com/phstc/sidekiq-statsd.png)](https://gemnasium.com/phstc/sidekiq-statsd)\n\nSidekiq StatsD is a [Sidekiq server middleware](https://github.com/mperham/sidekiq/wiki/Middleware) to send Sidekiq metrics through [statsd](https://github.com/reinh/statsd):\n\n  - [global metrics](https://github.com/mperham/sidekiq/wiki/API#wiki-stats)\n  - [queue metrics](https://github.com/mperham/sidekiq/wiki/API#queue)\n  - [worker metrics](https://github.com/mperham/sidekiq/wiki/API#workers) (`processing`, `runtime`)\n  - job metrics (`processing_time` and `success` / `failure`)\n\n## Compatibility\n\nSidekiq::Statsd is tested against [several Ruby versions](.travis.yml#L4).\n\n## Installation\n\nAdd these lines to your application's Gemfile:\n\n    gem \"statsd-ruby\"\n    # or if you are using Datadog\n    # gem \"dogstatsd-ruby\"\n    gem \"sidekiq-statsd\"\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install sidekiq-statsd\n\n## Configuration\n\nIn a Rails initializer or wherever you've configured Sidekiq, add\nSidekiq::Statsd to your server middleware:\n\n```ruby\nrequire 'statsd'\nstatsd = Statsd.new('localhost', 8125)\n\n# or if you are using Datadog\n# require 'datadog/statsd'\n# statsd = Datadog::Statsd.new('localhost', 8125)\n\nSidekiq.configure_server do |config|\n  config.server_middleware do |chain|\n    chain.add Sidekiq::Statsd::ServerMiddleware, env: \"production\", prefix: \"worker\", statsd: statsd\n  end\nend\n```\n\n### Sidekiq::Statsd::ServerMiddleware options\n\n```ruby\n# @param [Hash] options The options to initialize the StatsD client.\n# @option options [Statsd] :statsd Existing [statsd client](https://github.com/github/statsd-ruby) to use.\n# @option options [String] :env (\"production\") The env to segment the metric key (e.g. env.prefix.worker_name.success|failure).\n# @option options [String] :prefix (\"worker\") The prefix to segment the metric key (e.g. env.prefix.worker_name.success|failure).\n# @option options [String] :sidekiq_stats (\"true\") Send Sidekiq global stats e.g. total enqueued, processed and failed.\n```\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am \"Add some feature\"`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n## License\n\nMIT Licensed. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphstc%2Fsidekiq-statsd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphstc%2Fsidekiq-statsd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphstc%2Fsidekiq-statsd/lists"}