Closed wvanbergen closed 4 years ago
Ultimately different prefix should be different clients.
That or go redis-namespace
style.
Ultimately different prefix should be different clients.
That's the plan with the new client:
prefixed_client = StatsD.client.with_prefix('foo')
prefixed_client.increment('bar')
StatsD.measure(..., as_dict: true)
. AFAICS this keyword argument was mostly meant for internal use, but is part of a public method signature. You should useStatsD.distribution
directly instead.StatsD.metric(..., prefix: "foo")
. You can simply incorporate the prefix in the metric name. If you want to override the global prefix, setno_prefix
totrue
and incorporate your desired prefix in the name directly.I've modified strict mode to blow up when these keyword arguments are used. Testing that on the Shopify codebase now.