newrelic-ruby-agent
newrelic-ruby-agent copied to clipboard
Dynamic disable_<element>_sampler configuration keys ought to be symbols
While spelunking through the configuration manager's @cache hash, it was discovered that the disable_<element>_sampler keys (for example: 'disable_cpu_sampler``) are all stored as keys, despite their corresponding DefaultSourceentries being symbols.NewRelic::Agent::Sampler.enabled?` in turn checks the config hash with dynamically generated String based keys.
It is possible that the use of String in the sampler class versus the use of Symbol in the default source class causes a cache lookup failure. But even if things are working correctly for these parameters, we still ought to use Symbols for consistency. We can't even perform a simple #sort operation on the @cache hash currently given the class mismatch between keys.
https://new-relic.atlassian.net/browse/NR-324151