in src/ServiceProfiler.EventPipe.Otel/Microsoft.ApplicationInsights.Profiler.Shared/Orchestrations/RemoteSettingsServiceBase.cs [114:140]
protected override async Task ExecuteAsync(CancellationToken cancellationToken)
{
if (_standaloneMode)
{
_logger.LogTrace("Running in standalone mode. No remote settings will be fetched.");
return;
}
if (_isDisabled)
{
_logger.LogTrace("Profiler is disabled. No remote settings will be fetched.");
return;
}
if (_frequency > TimeSpan.Zero)
{
while (true)
{
await FetchRemoteSettingsAsync(cancellationToken).ConfigureAwait(false);
await Task.Delay(_frequency, cancellationToken).ConfigureAwait(false);
}
}
else
{
_logger.LogWarning("Configuration update frequency can't be negative.");
}
}