Reputation: 65
I am having a Java web app using spring boot and maven to connect Azure Application Insights for monitoring. The code run normally with the configuration of Application Insight's instrumentation key in file ApplicationInsight.xml using applicationinsights-agent jar
<envs>
<env name="APPLICATIONINSIGHTS_CONNECTION_STRING" value="InstrumentationKey=**iKey**" />
</envs>
And I can connect to this Application Insight resource to get telemetry data.
But I want to connect more one Application Insight with other instrumentation key in this java application.
UPDATE: I am using TelemetryClient now to set dynamic instrumentation keys, by this way I can mornitor 2 application insight resources in one java app.
But I want to use applicationinsights-agent to get these instrumentation keys from properties file (applicationinsights-agent jar file here: https://github.com/microsoft/ApplicationInsights-Java/releases/download/3.1.1/applicationinsights-agent-3.1.1.jar)
When I config 2 instrumentation keys in properties file and run, the system can only get the last instrumentation key.
Anyone can help me answer Is there anyway to get multiple instrumentation keys using applicationinsights-agent jar?
Thanks.
Upvotes: 1
Views: 1012
Reputation: 4923
AS per this MS Doc FAQ Should I use single or multiple Application Insights resources You can use one instance per Application.
Use a single resource for all the components or roles in a single business system. Use separate resources for development, test, and release versions, and for independent applications.
Refer this article for further information on deploying the number of application insights .
For more information refer Get started with Application Insights in a Java web project & SO thread .
Upvotes: 1