-
Notifications
You must be signed in to change notification settings - Fork 494
feat(prometheus.exporter.azure): expose concurrency settings #4951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,9 +18,8 @@ import ( | |
| ) | ||
|
|
||
| type Exporter struct { | ||
| cfg Config | ||
| logger *zap.SugaredLogger // used by azure client | ||
| ConcurrencyConfig azure_config.Opts | ||
| cfg Config | ||
| logger *zap.SugaredLogger // used by azure client | ||
| } | ||
|
|
||
| func (e Exporter) MetricsHandler() (http.Handler, error) { | ||
|
|
@@ -72,7 +71,13 @@ func (e Exporter) MetricsHandler() (http.Handler, error) { | |
| return | ||
| } | ||
|
|
||
| prober := metrics.NewMetricProber(ctx, logEntry, nil, settings, e.ConcurrencyConfig) | ||
| // Use concurrency settings from merged config to support query parameter overrides | ||
| concurrencyConfig := azure_config.Opts{} | ||
| concurrencyConfig.Prober.ConcurrencySubscription = mergedConfig.ConcurrencySubscription | ||
| concurrencyConfig.Prober.ConcurrencySubscriptionResource = mergedConfig.ConcurrencySubscriptionResource | ||
| concurrencyConfig.Prober.Cache = mergedConfig.EnableCaching | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we keep this PR to just the concurrency settings and remove the cache flag support? This isn't the only code that would have to change to enable caching and it's a bit convoluted to support properly. I can see resource graph response caching being valuable but the metric cache feels unnecessary unless you have misconfiguration alloy to scrape more often than the timespan config. |
||
|
|
||
| prober := metrics.NewMetricProber(ctx, logEntry, nil, settings, concurrencyConfig) | ||
| prober.SetAzureClient(client) | ||
| prober.SetPrometheusRegistry(reg) | ||
| prober.SetAzureResourceTagManager(tagManager) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.