For the metaprogrammign methods (statsd_count, statsd_measure, etc.), we still would like to support deprecated arguments like prefix and as_dist. However, when setting StatsD.singleton_client to a new client without enabling strict mode, we end up doing metric calls with arguments that are no longer supported.
This PR fixes that by handling the deprecated logic in the metaprogramming method directly, rather than forwarding the deprecated arguments to the metric methods.
We construct the name of the metric, taking the current StatsD.prefix, provided prefix, and no_prefix into account inside the metaprogramming method.
When setting as_dist when using statsd_measure, we call statsd_distribution directly.
For the metaprogrammign methods (
statsd_count
,statsd_measure
, etc.), we still would like to support deprecated arguments likeprefix
andas_dist
. However, when settingStatsD.singleton_client
to a new client without enabling strict mode, we end up doing metric calls with arguments that are no longer supported.This PR fixes that by handling the deprecated logic in the metaprogramming method directly, rather than forwarding the deprecated arguments to the metric methods.
StatsD.prefix
, providedprefix
, andno_prefix
into account inside the metaprogramming method.as_dist
when usingstatsd_measure
, we callstatsd_distribution
directly.