0

I am using java agent to collect telemetry data and send it to application insights.

currently I have configured sampling and log level in applicationinsights.json.

Is there a way to change this parameters at runtime? without restarting the service?

I have tried to change this properties at runtime e.g: APPLICATIONINSIGHTS_SAMPLING_PERCENTAGE but this does not seem to work

  • can you explain your use case for wanting to change these parameters at runtime, so we can see if there is any other way to accomplish? also feel free to post to https://github.com/microsoft/ApplicationInsights-Java/issues for future questions – trask Feb 01 '23 at 23:50
  • Hey @trask. We need to change logging and sampling level the agent uses without restarting the application. – Andre Silva Feb 02 '23 at 09:03

1 Answers1

0

I can see the same issue registered in MS Q&A Forum on the Same date and thanks to @AnuragSingh-MSFT for providing the solution to the Application Insights Information to the user:

Is there a way to change these parameters at runtime? without restarting the service?

App Restarts automatically after updating the Application Setting in the Configuration in Azure Hosted Application because these settings are read during app start for configuration and that will be stored in the memory.

Refer to the Q&A #1166345 for more information on Application Insights Sampling.