microsoft / ApplicationInsights-Profiler-AspNetCore

Application Insights Profiler sample and documentation
MIT License
66 stars 23 forks source link

Need a configuration that disables regular profiling but keeps triggered ones #148

Closed AdrenalineHc closed 2 years ago

AdrenalineHc commented 2 years ago

for now the profiler regular run is every 1 hour, but I am only interested for special scenarios, need a button to do that, especially for web app's codeless agent, thx

xiaomi7732 commented 2 years ago

Hi @AdrenalineHc, the codeless agent already supports that scenario:

image

Does that addresses your issue?

TeplrGuy commented 2 years ago

@xiaomi7732 any reason why you say this option is only available to codeless agent config? Does this mean on a Linux hosted .NET core application sample cannot be turned off from the portal?

xiaomi7732 commented 2 years ago

@TeplrGuy Thanks for bring this up. It was the case. However, thanks to a recent effort by @JacobBovee , Linux Profiler agent now supports using settings from the portal too. Refer to #158 for more details. You will need to use the latest NuGet package to try it out: https://www.nuget.org/packages/Microsoft.ApplicationInsights.Profiler.AspNetCore/2.4.0-beta1

Feel free to open new issue if you have further questions.