Replace statsd-client with statsd-instrument#5278
Merged
Merged
Conversation
df1e0ff to
a288ce2
Compare
a288ce2 to
49a83b3
Compare
statsd-ruby has not been released in 5+ years and its repo is archived. Shopify's statsd-instrument is actively maintained and, unlike dogstatsd-ruby, emits synchronously over a UDP sink with no background threads or telemetry -- behaving like the old client. The metric emitters (StatsdUpdater, the deployment updater scheduler and the diego sync job) call StatsD::Instrument::Client directly: timing -> measure (|ms), decrement -> increment(name, -1), and the grouping batch blocks become plain sequential calls since sends are synchronous. The emitted wire format is byte-identical (verified against a UDP listener), so the downstream statsd agent is unaffected. The UDP sink is memoized per address in the dependency locator. Unlike statsd-ruby (whose socket is GC-reclaimed), statsd-instrument pins its socket in a thread-local store that is never freed, so building a fresh sink on every statsd_client rebuild (once per test example via #reset) would leak a socket each time. One long-lived sink per address keeps it to a single socket -- correct for this singleton in production.
49a83b3 to
55ce780
Compare
philippthun
approved these changes
Jul 14, 2026
ari-wg-gitbot
added a commit
to cloudfoundry/capi-release
that referenced
this pull request
Jul 14, 2026
Changes in cloud_controller_ng:
- Replace statsd-client with statsd-instrument
PR: cloudfoundry/cloud_controller_ng#5278
Author: Johannes Haass <johannes.haass@sap.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
statsd-ruby has not been released in 5+ years and the repo is archived. Shopify/statsd-instrument is well maintained and gets regular releases.
I have reviewed the contributing guide
I have viewed, signed, and submitted the Contributor License Agreement
I have made this pull request to the
mainbranchI have run all the unit tests using
bundle exec rakeI have run CF Acceptance Tests