0

The problem: I've just instrumented a node micro-service with New Relic, and I can't see the data for that service in both aggregate (with other services) and individual (with no other service data) form.

Problem elaboration: As part of the New Relic instrumentation/configuration, I set the "app_name" using the service name. (This is a standard config setting for New Relic.)

Having done this, I'm able to go to New Relic and view that running micro-service by selecting it (by app_name) from a list of applications. I can see the overview, service map, transactions, database... Those pages are all nicely focused on my service, and highlight metrics of interest to me as the service owner/developer.

My manager, however, has a team of people who each own/develop services. My manager would like all those services to share the same "app_name", so he can go to New Relic, and see the overview, service map, transactions...all nicely showing metrics of interest across all the services for which he is responsible.

If we use unique names across the services, my manager doesn't get the aggregate view. If we use a common name across all services, the service owners don't get focused views of their services.

I'd like to enable both consumers of the New Relic data to get what they want.

This must be a common need that has a common solution.

What I've Tried/Learned: Multiple "app_name"s: I've learned that I can supply up to three "app_name" values for each service/app. I've tried this, and it seems to work just fine. By providing both a unique name and a common name, both of those application names are available in the "applications" selection list. This seems to do what we need, but the documentation implies this is intended to support applications running in different environments. It also seems to be a "hack-like" approach, since it is limited to three values, and one could imagine wanting more ways to aggregate data. If this is the recommended/common approach, I'm fine with it, however.

Category/Label Approach: I also experimented with adding a label for an application (a label being a key/value pair set in the New Relic configuration). That would seem to be a more general approach that would scale as far as needed. However, it doesn't solve the problem. It simply allows filtering a list of applications/services by category. The categories are not available as ways to aggregate metrics.

Insights/Infrastructure: There are New Relic features that I don't understand, yet. Our account doesn't have access to those features, so if they are the correct approach, I'll need to propose we enhance our account.

So. This seems like a fairly basic, common desire. I may have missed an obvious approach, but I haven't seen it yet. It's a bit tricky to search the New Relic documentation, since it's written using the language of New Relic features, and I don't know if I've used the right search terms.

If anyone knows of a generally correct way to solve this problem, I'd truly appreciate hearing from you.

caleb0199
  • 1
  • 1
  • 3

1 Answers1

0

New Relic is designed to work the way you initially started using it: one app in the real world is one app in New Relic. Each service or microservice should report into New Relic as a separate application in APM. Otherwise, you pollute the data you're receiving.

Consider the scenario where one app is public facing ("foo"), and another app is internal only ("bar"). If they both report back to New Relic using only one app name ("foobar") then you might open "foobar" in APM and see that it has moderate throughput but good response times. In reality, the public-facing may be getting hammered with requests or may be performing very poorly, but since you have a low traffic internal site that responds very quickly to every request your average throughput and your average response times in "foobar" look good.

If your manager needs to be able to look across app data then they should use New Relic Insights. You can query the data across multiple apps, for example:

SELECT * FROM Transaction WHERE appName = 'foo' OR appName = 'bar'

You can use the Event explorer in Insights to find more fields to query on.

anothermh
  • 9,815
  • 3
  • 33
  • 52