Closed
Description
Azure app insights is working in the way shown below.
Added these two dependencies:
- implementation("com.microsoft.azure:applicationinsights-agent:3.4.1")
- implementation("com.microsoft.azure:applicationinsights-runtime-attach:3.4.1")
Invoked the attach() method as mentioned in docs
@SpringBootApplication
public class SpringBootApp {
public static void main(String[] args) {
ApplicationInsights.attach();
SpringApplication.run(SpringBootApp.class, args);
}
}
I have created applicationinsight.json, added my connection string and placed in src/main/resources.
However, my need is to log local and dev logs to one connection string (resource group) and prod logs to another connection string (resource group).
I have tried creating a new file applicationinsight-local.json, applicationinsight-dev.json in same path. But, that doesnt seem to work.
Dont you offer this functionality.
Thanks.