'New Relic alert policy for Spring Boot application
I am monitoring my Spring Boot application using the New Relic micrometer library. The metrics are showing up fine. Now, I want to create an alert policy for the application. Here, after categorising the policy, the next step is selecting an entity for which the options are empty. Thus, I am not able to move forward with creating the alerts.
Attaching an image for reference: 
What is the reason for this and how to resolve it?
Solution 1:[1]
New Relic "Application" alerts are applied to the Application/Service entities (See your "Explorer" tab filtered to "Service"). In order to ensure that micrometer telemetry is associated with "Services" ensure that the SpringBoot instrumentation includes the serviceName of the application in the newRelicRegistryConfig.
public class NewRelicMetricsExportAutoConfiguration {
@Bean
public NewRelicRegistryConfig newRelicConfig() {
return new NewRelicRegistryConfig() {
(...)
@Override
public String serviceName() {
return "My Service Name";
}
};
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | rwjussel |
