Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic disable_<element>_sampler configuration keys ought to be symbols #2905

Open
fallwith opened this issue Oct 10, 2024 · 1 comment
Open

Comments

@fallwith
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant