Elasticsearch and Cloudwatch: Replace deprecated experimental/errorsource (#97363)

* Update elasticsearch

* Update azure monitor

* Update test

* Revert "Update azure monitor"

This reverts commit 21b53845b8.

* Update cloudwatch
This commit is contained in:
Ivana Huckova
2024-12-12 10:12:03 +01:00
committed by GitHub
parent ded90fa28d
commit 7de65b39b5
12 changed files with 47 additions and 49 deletions
@@ -7,7 +7,7 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/cloudwatch"
"github.com/aws/aws-sdk-go/service/cloudwatch/cloudwatchiface"
"github.com/grafana/grafana-plugin-sdk-go/experimental/errorsource"
"github.com/grafana/grafana-plugin-sdk-go/backend"
"github.com/grafana/grafana/pkg/tsdb/cloudwatch/features"
"github.com/grafana/grafana/pkg/tsdb/cloudwatch/utils"
)
@@ -28,7 +28,7 @@ func (e *cloudWatchExecutor) executeRequest(ctx context.Context, client cloudwat
resp, err := client.GetMetricDataWithContext(ctx, metricDataInput)
if err != nil {
return mdo, errorsource.DownstreamError(err, false)
return mdo, backend.DownstreamError(err)
}
mdo = append(mdo, resp)