newrelic / newrelic-java-agent

The New Relic Java agent
Apache License 2.0
202 stars 143 forks source link

MetricNameFormats should use a bounded cache #1825

Open jbedell-newrelic opened 7 months ago

jbedell-newrelic commented 7 months ago

https://github.com/newrelic/newrelic-java-agent/blob/4b53e4f75d16ebd3c5d41e3c777ea4da15480e6b/newrelic-agent/src/main/java/com/newrelic/agent/tracers/metricname/MetricNameFormats.java#L21-L23

If a customer were to create enough segments with extremely dynamic names, this cache could grow to an unreasonable size and appear to be a memory leak.

workato-integration[bot] commented 7 months ago

https://new-relic.atlassian.net/browse/NR-253913