Description
Expected behavior
I deploy several Java Spring Boot micro services to ACA, I successfully see the AppInsight Application Map including Azure DB MySQL, all micro services, the Config-Server and 1 external akamai site but NOT Key Vault.
Actual behavior
Key Vault should be displayed on the Map as each micro service back-end (not the API gateway) read a password secret from KV to connect to the DB.
To Reproduce
Steps to reproduce the behavior:
https://github.com/ezYakaEagle442/aca-java-petclinic-mic-srv
Sample Application
If applicable, provide a sample application which reproduces the issue:
https://github.com/ezYakaEagle442/aca-java-petclinic-mic-srv
System information
Please provide the following information:
- SDK Version: ApplicationInsights-Java agent 3.4.1
- OS type and version: mcr.microsoft.com/openjdk/jdk:11-mariner
- Application Server type and version (if applicable): N/A
- Using spring-boot? YES
- Additional relevant libraries (with version, if applicable):
See the POM at https://github.com/ezYakaEagle442/aca-java-petclinic-mic-srv/blob/main/pom.xml :
<!-- tip to verify the dependencies: mvn dependency:tree -->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.13</version> <!-- /!\ Bug in Netty with Spring Boot 2.6.6, see https://github.com/netty/netty/issues/12343 -->
</parent>
<spring-cloud.version>2021.0.4</spring-cloud.version>
<spring-cloud-azure.version>4.4.0</spring-cloud-azure.version>
<spring-boot.version>2.6.13</spring-boot.version> <!-- /!\ Bug in Netty with Spring Boot 2.6.6, see https://github.com/netty/netty/issues/12343 -->
<java.version>11</java.version>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
Dockerfile example at https://github.com/ezYakaEagle442/aca-java-petclinic-mic-srv/blob/main/docker/petclinic-customers-service/Dockerfile
see also Bicep overiding the Docker command at https://github.com/ezYakaEagle442/aca-java-petclinic-mic-srv/blob/main/iac/bicep/modules/aca/apps/aca-svc.bicep#189
Logs
Turn on SDK logs and attach/paste them to the issue. If using an application server, also attach any relevant server logs.
Be sure to remove any private information from the logs before posting!
Kusto Query:
ContainerAppConsoleLogs_CL
| where Log_s contains "Application Insights"
| project c, AppName=ContainerAppName_s ,Revision=RevisionName_s, Message=Log_s
| sort by Time desc
LOG_ANALYTICS_WORKSPACE_CLIENT_ID=`az monitor log-analytics workspace show -n $LOG_ANALYTICS_WORKSPACE -g $RESOURCE_GROUP --query customerId --out tsv`
az monitor log-analytics query \
--workspace $LOG_ANALYTICS_WORKSPACE_CLIENT_ID \
--analytics-query "ContainerAppConsoleLogs_CL | where Log_s contains 'Application Insights' | where TimeGenerated > ago(4h) | \
project Time =TimeGenerated, ContainerAppName_s, Revision=RevisionName_s, Log_s | sort by Time desc " \
--out table > aca-petcliaca-appinsights.log
Screenshots
N/A
See also microsoft/azure-container-apps#290
Note: this issue does NOT happen with Azure Spring Apps / AppInsight Application Map
See my project at https://github.com/ezYakaEagle442/azure-spring-apps-petclinic-mic-srv