add log statements for debugging (#559)

This commit is contained in:
rekhaswaminathan 2020-08-12 17:28:47 -07:00 коммит произвёл GitHub
Родитель 1c2b0bbcce
Коммит 3207e5401d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -172,6 +172,7 @@ namespace Diagnostics.RuntimeHost.Services.SourceWatcher.Watchers
private async Task StartBlobDownload(bool startup = false)
{
DiagnosticsETWProvider.Instance.LogAzureStorageMessage(nameof(StorageWatcher), $"Blobcache last modified at {blobCacheLastModifiedTime}");
var detectorsList = await storageService.GetEntitiesByPartitionkey("Detector");
var gists = !LoadOnlyPublicDetectors ? await storageService.GetEntitiesByPartitionkey("Gist") : new List<DiagEntity>();
var entitiesToLoad = new List<DiagEntity>();

Просмотреть файл

@ -90,7 +90,6 @@ namespace Diagnostics.RuntimeHost.Services.StorageService
var filterPartitionKey = TableQuery.GenerateFilterCondition(PartitionKey, QueryComparisons.Equal, partitionKey);
var tableQuery = new TableQuery<DiagEntity>();
tableQuery.Where(filterPartitionKey);
DiagnosticsETWProvider.Instance.LogAzureStorageMessage(nameof(StorageService), $"GetEntities by partition key {partitionKey}");
TableContinuationToken tableContinuationToken = null;
var detectorsResult = new List<DiagEntity>();
timeTakenStopWatch.Start();
@ -143,7 +142,8 @@ namespace Diagnostics.RuntimeHost.Services.StorageService
TableResult result = await table.ExecuteAsync(insertOrReplaceOperation);
timeTakenStopWatch.Stop();
DiagnosticsETWProvider.Instance.LogAzureStorageMessage(nameof(StorageService), $"InsertOrReplace result : {result.HttpStatusCode}, time taken {timeTakenStopWatch.ElapsedMilliseconds}");
DiagEntity insertedCustomer = result.Result as DiagEntity;
DiagEntity insertedEntity = result.Result as DiagEntity;
DiagnosticsETWProvider.Instance.LogAzureStorageMessage(nameof(StorageService), $"Inserted entity {insertedEntity.RowKey.ToString()} timestamp: {insertedEntity.Timestamp}");
return detectorEntity;
}
catch (Exception ex)