Skip to content

In Java agent 3.4.14, facing issues related to env variables setting of app insights content #3187

Closed
@balaji2796

Description

@balaji2796

using applicationinsights-runtime-attach 3.4.14 for spring boot 3

  1. 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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions