From b2c6c743ce8765e858c8b0fe42f84ab05bcb9534 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Wed, 10 Oct 2018 17:33:38 +0200 Subject: [PATCH] stackdriver: add debug logging --- pkg/api/pluginproxy/ds_auth_provider.go | 1 + pkg/tsdb/stackdriver/stackdriver.go | 1 + pkg/tsdb/stackdriver/test_datasource_query.go | 2 ++ 3 files changed, 4 insertions(+) diff --git a/pkg/api/pluginproxy/ds_auth_provider.go b/pkg/api/pluginproxy/ds_auth_provider.go index 60360733923..c6afeb38879 100644 --- a/pkg/api/pluginproxy/ds_auth_provider.go +++ b/pkg/api/pluginproxy/ds_auth_provider.go @@ -55,6 +55,7 @@ func ApplyRoute(ctx context.Context, req *http.Request, proxyPath string, route } } + logger.Info("ds-auth-provider-authenticationType", "debug", e.dsInfo.JsonData.Get("authenticationType")) authenticationType := ds.JsonData.Get("authenticationType").MustString("jwt") if route.JwtTokenAuth != nil && authenticationType == "jwt" { logger.Info("authenticationType", "authenticationType", "jwt") diff --git a/pkg/tsdb/stackdriver/stackdriver.go b/pkg/tsdb/stackdriver/stackdriver.go index 82c1e521c01..c42e5463f80 100644 --- a/pkg/tsdb/stackdriver/stackdriver.go +++ b/pkg/tsdb/stackdriver/stackdriver.go @@ -96,6 +96,7 @@ func (e *StackdriverExecutor) executeTimeSeriesQuery(ctx context.Context, tsdbQu Results: make(map[string]*tsdb.QueryResult), } + logger.Info("executeTimeSeriesQuery-authenticationType", "debug", e.dsInfo.JsonData.Get("authenticationType")) authenticationType := e.dsInfo.JsonData.Get("authenticationType").MustString(jwtAuthentication) if authenticationType == gceAuthentication { defaultProject, err := e.getDefaultProject(ctx) diff --git a/pkg/tsdb/stackdriver/test_datasource_query.go b/pkg/tsdb/stackdriver/test_datasource_query.go index c5968b6a081..be4bab38734 100644 --- a/pkg/tsdb/stackdriver/test_datasource_query.go +++ b/pkg/tsdb/stackdriver/test_datasource_query.go @@ -8,6 +8,7 @@ import ( "net/http" "strings" + "github.com/grafana/grafana/pkg/cmd/grafana-cli/logger" "github.com/grafana/grafana/pkg/components/simplejson" "golang.org/x/net/context/ctxhttp" @@ -20,6 +21,7 @@ func (e *StackdriverExecutor) executeTestDataSource(ctx context.Context, tsdbQue Results: make(map[string]*tsdb.QueryResult), } + logger.Info("executeTestDataSource-authenticationType", "debug", e.dsInfo.JsonData.Get("authenticationType")) authenticationType := e.dsInfo.JsonData.Get("authenticationType").MustString(jwtAuthentication) if authenticationType == gceAuthentication { defaultProject, err := e.getDefaultProject(ctx)