{"action":"opened","issue":{"url":"https://api.github.com/repos/buildkite/buildkite-metrics/issues/37","repository_url":"https://api.github.com/repos/buildkite/buildkite-metrics","labels_url":"https://api.github.com/repos/buildkite/buildkite-metrics/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/buildkite/buildkite-metrics/issues/37/comments","events_url":"https://api.github.com/repos/buildkite/buildkite-metrics/issues/37/events","html_url":"https://github.com/buildkite/buildkite-metrics/issues/37","id":295803599,"number":37,"title":"Whitout interval sometimes stats don't reach statsd","user":{"login":"theist","id":136464,"avatar_url":"https://avatars1.githubusercontent.com/u/136464?v=4","gravatar_id":"","url":"https://api.github.com/users/theist","html_url":"https://github.com/theist","followers_url":"https://api.github.com/users/theist/followers","following_url":"https://api.github.com/users/theist/following{/other_user}","gists_url":"https://api.github.com/users/theist/gists{/gist_id}","starred_url":"https://api.github.com/users/theist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theist/subscriptions","organizations_url":"https://api.github.com/users/theist/orgs","repos_url":"https://api.github.com/users/theist/repos","events_url":"https://api.github.com/users/theist/events{/privacy}","received_events_url":"https://api.github.com/users/theist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-09T09:22:01Z","updated_at":"2018-02-09T09:22:01Z","closed_at":null,"author_association":"NONE","body":"While testing `buildkite-metrics` with my test conditions, between two and five agents and 12 pipelines or so, I've fount that if you use only one loop (without interval) and statsd as backend (on localhost) most of the time the stats never get out of buildkite metrics. I've check this also with `tcpdump` to discard a problem with the statsd daemon.\r\n\r\nLooking at the code there' s a buffered client with 100 comands buffer ad 100ms refresh. But somewhat seems that the program ends before the client send its payload by UDP.\r\n\r\nI found a Flush method but it seems that the vendored version of the library does not support it.\r\n\r\nI've prepared a PR that updates the statsd library and flushes the statsd client after each `Collect`\r\n"}}
{"actor":{"display_login":"theist"}}