Skip to content

Commit

Permalink
add debug logging for resource ID metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
hkfgo committed Sep 12, 2024
1 parent fc0362d commit 4dff71b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Promitor.Core.Scraping/AzureMonitorScraper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ protected override async Task<List<ScrapeResult>> BatchScrapeResourceAsync(strin
// Query Azure Monitor for metrics
Logger.LogWarning("Querying Azure Monitor for metric {MetricName} with batch size {BatchSize}", metricName, resourceUriList.Count);
resourceIdTaggedMeasuredMetrics = await AzureMonitorClient.BatchQueryMetricAsync(metricName, dimensionNames, aggregationType, aggregationInterval, resourceUriList, metricFilter, metricLimit);
foreach (var resourceMetric in resourceIdTaggedMeasuredMetrics)
{
Logger.LogWarning("Discovered value {Value} for metric {Metric} and resource ID {ResourceID}", resourceMetric.Value, metricName, resourceMetric.ResourceId);
}
}
catch (MetricInformationNotFoundException metricsNotFoundException)
{
Expand Down

0 comments on commit 4dff71b

Please sign in to comment.