Cloudwatch: Remove core imports from infra/log (#81543)

* Cloudwatch: use logging from plugin-sdk-go instead of infra/log
* Add a link to the TODO issue for moving `instrumentContext`
This commit is contained in:
Nathan Vērzemnieks
2024-02-07 13:53:05 +01:00
committed by GitHub
parent c16cb7ed3c
commit b5f26560c2
28 changed files with 211 additions and 172 deletions
+3 -2
View File
@@ -10,6 +10,7 @@ import (
"github.com/aws/aws-sdk-go/service/cloudwatch"
"github.com/aws/aws-sdk-go/service/cloudwatch/cloudwatchiface"
"github.com/grafana/grafana-plugin-sdk-go/backend"
"github.com/grafana/grafana-plugin-sdk-go/backend/log"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -29,7 +30,7 @@ func TestQuery_AnnotationQuery(t *testing.T) {
client = fakeCWAnnotationsClient{describeAlarmsForMetricOutput: &cloudwatch.DescribeAlarmsForMetricOutput{}}
im := defaultTestInstanceManager()
executor := newExecutor(im, &fakeSessionCache{})
executor := newExecutor(im, &fakeSessionCache{}, log.NewNullLogger())
_, err := executor.QueryData(context.Background(), &backend.QueryDataRequest{
PluginContext: backend.PluginContext{
DataSourceInstanceSettings: &backend.DataSourceInstanceSettings{},
@@ -61,7 +62,7 @@ func TestQuery_AnnotationQuery(t *testing.T) {
client = fakeCWAnnotationsClient{describeAlarmsOutput: &cloudwatch.DescribeAlarmsOutput{}}
im := defaultTestInstanceManager()
executor := newExecutor(im, &fakeSessionCache{})
executor := newExecutor(im, &fakeSessionCache{}, log.NewNullLogger())
_, err := executor.QueryData(context.Background(), &backend.QueryDataRequest{
PluginContext: backend.PluginContext{
DataSourceInstanceSettings: &backend.DataSourceInstanceSettings{},