Skip to content

Commit

Permalink
azure_exporter: Fix bug which prevents subscription scope from workin…
Browse files Browse the repository at this point in the history
…g with only a single region (#6719)
  • Loading branch information
kgeckhart authored Apr 3, 2024
1 parent 2f0ac73 commit 53a13ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ Main (unreleased)

- Fix an issue where JSON string array elements were not parsed correctly in `loki.source.cloudflare`. (@thampiotr)

- Fix an issue where the azure exporter was not correctly gathering subscription scoped metrics when only one region was configured (@kgeckhart)

- Update gcp_exporter to a newer version with a patch for incorrect delta histograms (@kgeckhart)

- Fix an issue where the default values of some component's arguments change
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (e Exporter) MetricsHandler() (http.Handler, error) {
// "RunOnSubscriptionScope" uses a different API, https://github.com/Azure/azure-rest-api-specs/blob/main/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-05-01/metrics_API.json#L40,
// which can get metric data for all resources in a single API call reducing overhead/likelihood of being rate limited.
// Limiting to specific resources requires 1 API call per resource to get metrics which can easily lead to rate limiting
if len(settings.Regions) > 1 {
if len(settings.Regions) > 0 {
prober.RunOnSubscriptionScope()
} else {
err = prober.ServiceDiscovery.FindResourceGraph(ctx, settings.Subscriptions, settings.ResourceType, settings.Filter)
Expand Down

0 comments on commit 53a13ba

Please sign in to comment.