Open jdelStrother opened 5 months ago
Thanks for submitting this feature request! It's an interesting idea that i don't think we've considered before. Metric normalization, like you had mentioned, happens after the data has already left the ruby agent, but currently, there is no built in way to accomplish this within the ruby agent itself. I'll bring it back to our team to discuss and prioritize.
In the mean time, after taking a quick look I think your idea for your workaround by changing ExternalRequestSegment#name
is reasonable to try out, but I would also like to point out that there is another metric other than the segment name that gets created using the host, so unless you make updates there, you may run into the same MGI issue. Hopefully that helps!
I would also like to point out that there is another metric other than the segment name that gets created using the host
Good catch, thanks. I'll try overriding ExternalRequestSegment#host
instead.
Is your feature request related to a problem? Please describe.
Our app fetches a lot of RSS feeds from a lot of different third-party hosts, which generates a lot of metric names like
External/foo.com/Net::HTTP/GET
, which can lead to MGIFeature Description
I'd like a way of grouping those requests, while still allowing all our other HTTP requests (eg API calls to s3.amazonaws.com) to keep their own default grouping. Perhaps something like:
which would generate two segments, both with the grouped name
External/rss-host/Net::HTTP/GET
.(I can definitely see why that exact API has issues, open to alternative suggestions)
Describe Alternatives
You could maybe do this with NewRelic's metric-normalization rules, but wanting to keep existing names for things like our API services makes it harder - we'd need to know in advance the hosts that we want to whitelist, and then use a REPLACE rule on all the remaining ones.
I'm considering monkey-patching
ExternalRequestSegment#name
so that it can be overridden by a thread-local variable.Priority
Really Want