ApplicationInsights-Java icon indicating copy to clipboard operation
ApplicationInsights-Java copied to clipboard

APPLICATIONINSIGHTS_CONFIGURATION_CONTENT will not be considered in Azure Functions

Open franden opened this issue 7 months ago • 0 comments

Expected behavior

Content of environment variable APPLICATIONINSIGHTS_CONFIGURATION_CONTENT is considered by application insights agent

Actual behavior

We are using a quarkus framework to create and run our Azure Function. We set the application insights setting "Collection level" to Recommended so that the application insights agent is automatically added. Because vertx communication is not visible in the Application Insights we would like to enable it via entry in applicationinsights.json

{
   "preview":{
      "instrumentation":{
         "vertx":{
            "enabled":true
         }
      }
   }
}

we provided the content via environment variable APPLICATIONINSIGHTS_CONFIGURATION_CONTENT, but the issue is still present. We added some more configuration to APPLICATIONINSIGHTS_CONFIGURATION_CONTENT, but it seems that this doesn't have any effect. Even if the content is not a valid json, nothing happens (even no logs).

To Reproduce

  1. create quarkus application
  2. deploy the application
  3. set the "Collection level" to Recommended
  4. set environment variable APPLICATIONINSIGHTS_CONFIGURATION_CONTENT with some content

System information

Please provide the following information:

  • Quarkus 3.11.1 it uses azure-functions-java-library 3.1.0
  • Java 17
  • Azure Function OS: Linux
  • Azure Function Runtime version: 4.34.2.2
  • Used application insights agent version: ?? is not printed in the log

Logs

Screenshots

franden avatar Jul 01 '24 12:07 franden