mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Add context to datasource service (#42294)
* Add context to datasource service * Adjust wire for ShouldBeReported method * Replace inTransactionCtx
This commit is contained in:
@@ -257,7 +257,7 @@ func (e *AlertEngine) registerUsageMetrics() {
|
||||
metrics := map[string]interface{}{}
|
||||
|
||||
for dsType, usageCount := range alertingUsageStats.DatasourceUsage {
|
||||
if e.usageStatsService.ShouldBeReported(dsType) {
|
||||
if e.usageStatsService.ShouldBeReported(ctx, dsType) {
|
||||
metrics[fmt.Sprintf("stats.alerting.ds.%s.count", dsType)] = usageCount
|
||||
} else {
|
||||
alertingOtherCount += usageCount
|
||||
|
||||
Reference in New Issue
Block a user