Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key Vault not displayed on Azure Container Apps / AppInsight Application Map #2699

Closed
ezYakaEagle442 opened this issue Nov 14, 2022 · 5 comments

Comments

@ezYakaEagle442
Copy link

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

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

@ghost ghost added the Needs: Triage 🔍 label Nov 14, 2022
@ezYakaEagle442
Copy link
Author

@trask could you please have a look ?
also I did not deploy the spring Eureka registry as I rely on the underlying ACA/AKS/K8S native discovery service, would this impact the AppInsight behaviour ?

@trask
Copy link
Member

trask commented Dec 11, 2022

@ezYakaEagle442 I wasn't able to reproduce the issue with 3.4.1, but I was able to reproduce the issue with 3.4.6, can you double check the version you are using in ACA?

#2787 fixes this regression, can you test with the SNAPSHOT build from that PR to confirm it resolves the same issue you are seeing? https://github.com/microsoft/ApplicationInsights-Java/suites/9800980771/artifacts/471519944

@ezYakaEagle442
Copy link
Author

https://github.com/ezYakaEagle442/aca-java-petclinic-mic-srv/blob/main/docker/petclinic-vets-service/Dockerfile#L13 shows last time I used version 3.4.4, I will test locally with that snapshot, thank you.

Do you have an ETA for 3.4.7 release please ?

@trask
Copy link
Member

trask commented Dec 12, 2022

Do you have an ETA for 3.4.7 release please ?

currently aiming for Wednesday of this week

trask added a commit that referenced this issue Dec 13, 2022
See #2699

Co-authored-by: github-actions[bot] <github-action[bot]@users.noreply.github.com>
@trask
Copy link
Member

trask commented Dec 14, 2022

@trask trask closed this as completed Dec 14, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jan 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants