Closed
Description
using applicationinsights-runtime-attach 3.4.14 for spring boot 3
- I wanted to filter out all assets folder calls from app insights so saw the documentation and used the sampling overrides now facing issues with the env variable setting of the APPLICATIONINSIGHTS_CONFIGURATION_CONTENT. so in this would be the key in env variable APPLICATIONINSIGHTS_CONFIGURATION_CONTENT and value i have kept the entire file content including connectionString.
{"connectionString":"…","preview": {"sampling": {"overrides": [{"telemetryType": "request","attributes": [{"key": "http.url","value": "https?://[^/]+/assets/","matchType": "regexp"}],"percentage": 0}]}}}
when i run the application getting this error
java.lang.IllegalStateException:com.microsoft.applicationinsights.agent.internal.configuration.ConfigurationBuilder$ConfigurationException: "connectionString" attribute is not supported inside of APPLICATIONINSIGHTS_CONFIGURATION_CONTENT, please use APPLICATIONINSIGHTS_CONNECTION_STRING to specify the connection string