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

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

Closed
balaji2796 opened this issue Jul 11, 2023 · 1 comment · Fixed by #3191

Comments

@balaji2796
Copy link

balaji2796 commented Jul 11, 2023

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

@heyams heyams self-assigned this Jul 11, 2023
@heyams
Copy link
Contributor

heyams commented Jul 11, 2023

@balaji2796 we will allow 'connectionString' via APPLICATIONINSIGHTS_CONFIGURATION_CONTENT in the next release. thank you for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants