{"id":22511138,"url":"https://github.com/renderedtext/watchman","last_synced_at":"2026-05-03T04:39:13.436Z","repository":{"id":137212917,"uuid":"64828642","full_name":"renderedtext/watchman","owner":"renderedtext","description":"Watchman is your friend who monitors your processes so you don't have to","archived":false,"fork":false,"pushed_at":"2025-02-20T04:41:05.000Z","size":43,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-02-20T05:29:24.297Z","etag":null,"topics":["monitor","rails","semaphore-open-source","watchman"],"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/renderedtext.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2016-08-03T08:20:55.000Z","updated_at":"2024-07-12T11:26:12.000Z","dependencies_parsed_at":"2024-06-20T09:23:19.677Z","dependency_job_id":"73034e51-eb7c-44d5-a872-fca134574288","html_url":"https://github.com/renderedtext/watchman","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/renderedtext%2Fwatchman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renderedtext%2Fwatchman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renderedtext%2Fwatchman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renderedtext%2Fwatchman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renderedtext","download_url":"https://codeload.github.com/renderedtext/watchman/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245949553,"owners_count":20698916,"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":["monitor","rails","semaphore-open-source","watchman"],"created_at":"2024-12-07T02:09:14.179Z","updated_at":"2026-05-03T04:39:13.405Z","avatar_url":"https://github.com/renderedtext.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Watchman\n\nWatchman is your friend who monitors your processes so you don't have to.\n\n## Installation\n\n``` ruby\ngem \"rt-watchman\", :require =\u003e \"watchman\"\n```\n\n## Usage\n\nFirst, set up the host and the port of the metrics server:\n\n``` ruby\nWatchman.host = \"localhost\"\nWatchman.port = 22345\n```\n\nTo submit a value to statsd from your service use:\n\n``` ruby\nWatchman.submit(name, value, type)\n```\n\nAvailable types:\n* :gauge `default`\n* :timing\n* :count\n\nSubmitting a simple gauge value from your service would look like:\n\n``` ruby\nWatchman.submit(\"number.of.kittens\", 30)\n```\n\nTo benchmark a part of your service:\n\n``` ruby\nWatchman.benchmark(\"time.to.wake.up\") do\n  puts \"Sleeping\"\n  sleep 10\n  puts \"Wake up\"\nend\n```\n\nTo submit a time value in milliseconds use:\n\n``` ruby\nWatchman.submit(\"number.of.kittens\", 30, :timing)\n```\n\nTo submit a count value use:\n\n``` ruby\n# To increse:\nWatchman.increment(\"number.of.kittens\")\n\n# or decrese:\nWatchman.decrement(\"number.of.kittens\")\n```\n\nAlternatively you can use:\n\n``` ruby\n# To increse:\nWatchman.submit(\"number.of.kittens\", 1, :count)\n\n# or decrese:\nWatchman.submit(\"number.of.kittens\", -1, :count)\n```\n\nto achieve the equivalent effect, with the added possibility of tweaking the\nvalue.\n\n## Tags\n\nIf you want to use a variable that changes often, don't use this:\n\n``` ruby\nWatchman.submit(\"user.#{id}\", 30)\n```\n\nUse tags. A list of tags is an optional last parameter of `:submit`, `:benchmark`,\n`:increment` and `:decrement` methods.\n\n``` ruby\nWatchman.submit(\"user\", 30, tags: [id])\n```\n\nTags list is limited to 3 values.\n\n## Tags for datadog/cloudwatch\nIn case you want your metrics to be formated with cloudwatch style taggs, you need to provide tags\nin this style\n``` ruby\nWatchman.submit(\"age.of.kittens\", 30, :timing, :tags =\u003e [\"tag:a\"])\n```\n## Global metric prefix\n\nIf you want to prepend all the metric names with a prefix, do the following:\n\n``` ruby\nWatchman.prefix = \"production.server1\"\n```\n\nThen, all your metrics will be saved with that prefix. For example:\n\n``` ruby\nWatchman.submit(\"high.score\", 100) # =\u003e production.server1.high.score = 100\n```\n\n## Filtering metrics\n\nIf you want to filter metrics based on some condition, do the foloowing:\n\n```ruby\nWatchman.do_filter = true\n```\n\nThen none of the metrics without options flag ```external``` will be ignored and \nonly metrics like the following will be sent out:\n```ruby\nWatchman.submit(\"number.of.puppies\", 3, :gauge, {external: true})\n```\n\n## Test mode for Watchman\n\nIn tests you can set the following:\n\n``` ruby\nWatchman.test_mode = true\n```\n\nThat way watchman will use a stubbed client, and won't send any data to the\nmetric server.\n\n## License\n\nThis software is licensed under [the Apache 2.0 license](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenderedtext%2Fwatchman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenderedtext%2Fwatchman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenderedtext%2Fwatchman/lists"}