Closed ghost closed 3 years ago
Thanks for reaching out. It seems like the property azure.application-insights.instrumentation-key
is introduced by applicationinsights-spring-boot-starter
. So perhaps this is the right place to report this issue.
One more thing as I find in their doc, is it possible the wrong configuration is used?
# Enable/Disable tracking. Default value: true.
azure.application-insights.enabled=true
Any update on this issue?
Closing this issue. Because it's not active for a long time. If anyone have similar issue, please create issue in new repo: https://github.com/Azure/azure-sdk-for-java/issues
Environment
Spring boot starter:
OS Type: Windows/Linux/MacOS
Java version:
Summary
When disabling the publishing of metrics the instrumentation-key becomes irrelevant and shouldn't cause the app not to start when it's missing. As it stands you have to provide a dummy instrumentation key when you for example, are working on a development version of an app and don't want to publish any metrics.
Reproduce steps
Add metrics by adding in the following dependencies and setting:
azure.application-insights.trackingDisabled=true
NB
azure.application-insights.instrumentation-key
is not set.com.microsoft.azure:applicationinsights-spring-boot-starter:2.5.1 com.microsoft.azure:azure-spring-boot-metrics-starter:2.2.0
Expected Results
App should start with no metrics published
Actual Results
App fails to start, throws exception via this code in
ApplicationInsightsTelemetryAutoConfiguration