add debug log

This commit is contained in:
Mitsuhiro Tanda 2017-09-28 02:31:09 +09:00
parent 468e8c13ee
commit 5e88177f28

View File

@ -11,6 +11,7 @@ import (
"github.com/grafana/grafana/pkg/log"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/tsdb"
"github.com/aws/aws-sdk-go/aws"
@ -159,6 +160,10 @@ func (e *CloudWatchExecutor) executeQuery(ctx context.Context, parameters *simpl
params.ExtendedStatistics = query.ExtendedStatistics
}
if setting.Env == setting.DEV {
plog.Debug("CloudWatch query", "raw query", params)
}
resp, err := client.GetMetricStatisticsWithContext(ctx, params, request.WithResponseReadTimeout(10*time.Second))
if err != nil {
return nil, err