Commit b02a8127 by Erik Sundell

stackdriver: remove debug comments

parent a56c5841
...@@ -55,10 +55,8 @@ func ApplyRoute(ctx context.Context, req *http.Request, proxyPath string, route ...@@ -55,10 +55,8 @@ func ApplyRoute(ctx context.Context, req *http.Request, proxyPath string, route
} }
} }
logger.Info("ds-auth-provider-authenticationType", "debug", ds.JsonData.Get("authenticationType"))
authenticationType := ds.JsonData.Get("authenticationType").MustString("jwt") authenticationType := ds.JsonData.Get("authenticationType").MustString("jwt")
if route.JwtTokenAuth != nil && authenticationType == "jwt" { if route.JwtTokenAuth != nil && authenticationType == "jwt" {
logger.Info("authenticationType", "authenticationType", "jwt")
if token, err := tokenProvider.getJwtAccessToken(ctx, data); err != nil { if token, err := tokenProvider.getJwtAccessToken(ctx, data); err != nil {
logger.Error("Failed to get access token", "error", err) logger.Error("Failed to get access token", "error", err)
} else { } else {
...@@ -67,7 +65,6 @@ func ApplyRoute(ctx context.Context, req *http.Request, proxyPath string, route ...@@ -67,7 +65,6 @@ func ApplyRoute(ctx context.Context, req *http.Request, proxyPath string, route
} }
if authenticationType == "gce" { if authenticationType == "gce" {
logger.Info("authenticationType", "authenticationType", "gce")
tokenSrc, err := google.DefaultTokenSource(ctx, route.JwtTokenAuth.Scopes...) tokenSrc, err := google.DefaultTokenSource(ctx, route.JwtTokenAuth.Scopes...)
if err != nil { if err != nil {
logger.Error("Failed to get default token from meta data server", "error", err) logger.Error("Failed to get default token from meta data server", "error", err)
......
...@@ -19,7 +19,6 @@ import ( ...@@ -19,7 +19,6 @@ import (
"golang.org/x/oauth2/google" "golang.org/x/oauth2/google"
"github.com/grafana/grafana/pkg/api/pluginproxy" "github.com/grafana/grafana/pkg/api/pluginproxy"
"github.com/grafana/grafana/pkg/cmd/grafana-cli/logger"
"github.com/grafana/grafana/pkg/components/null" "github.com/grafana/grafana/pkg/components/null"
"github.com/grafana/grafana/pkg/components/simplejson" "github.com/grafana/grafana/pkg/components/simplejson"
"github.com/grafana/grafana/pkg/log" "github.com/grafana/grafana/pkg/log"
...@@ -96,7 +95,6 @@ func (e *StackdriverExecutor) executeTimeSeriesQuery(ctx context.Context, tsdbQu ...@@ -96,7 +95,6 @@ func (e *StackdriverExecutor) executeTimeSeriesQuery(ctx context.Context, tsdbQu
Results: make(map[string]*tsdb.QueryResult), Results: make(map[string]*tsdb.QueryResult),
} }
logger.Info("executeTimeSeriesQuery-authenticationType", "debug", e.dsInfo.JsonData.Get("authenticationType"))
authenticationType := e.dsInfo.JsonData.Get("authenticationType").MustString(jwtAuthentication) authenticationType := e.dsInfo.JsonData.Get("authenticationType").MustString(jwtAuthentication)
if authenticationType == gceAuthentication { if authenticationType == gceAuthentication {
defaultProject, err := e.getDefaultProject(ctx) defaultProject, err := e.getDefaultProject(ctx)
...@@ -596,7 +594,6 @@ func (e *StackdriverExecutor) getDefaultProject(ctx context.Context) (string, er ...@@ -596,7 +594,6 @@ func (e *StackdriverExecutor) getDefaultProject(ctx context.Context) (string, er
if err != nil { if err != nil {
return "", fmt.Errorf("Failed to retrieve default project from GCE metadata server. error: %v", err) return "", fmt.Errorf("Failed to retrieve default project from GCE metadata server. error: %v", err)
} else { } else {
logger.Info("projectName", "projectName", defaultCredentials.ProjectID)
return defaultCredentials.ProjectID, nil return defaultCredentials.ProjectID, nil
} }
} else { } else {
......
...@@ -8,7 +8,6 @@ import ( ...@@ -8,7 +8,6 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/grafana/grafana/pkg/cmd/grafana-cli/logger"
"github.com/grafana/grafana/pkg/components/simplejson" "github.com/grafana/grafana/pkg/components/simplejson"
"golang.org/x/net/context/ctxhttp" "golang.org/x/net/context/ctxhttp"
...@@ -21,7 +20,6 @@ func (e *StackdriverExecutor) executeTestDataSource(ctx context.Context, tsdbQue ...@@ -21,7 +20,6 @@ func (e *StackdriverExecutor) executeTestDataSource(ctx context.Context, tsdbQue
Results: make(map[string]*tsdb.QueryResult), Results: make(map[string]*tsdb.QueryResult),
} }
logger.Info("executeTestDataSource-authenticationType", "debug", e.dsInfo.JsonData.Get("authenticationType"))
authenticationType := e.dsInfo.JsonData.Get("authenticationType").MustString(jwtAuthentication) authenticationType := e.dsInfo.JsonData.Get("authenticationType").MustString(jwtAuthentication)
if authenticationType == gceAuthentication { if authenticationType == gceAuthentication {
defaultProject, err := e.getDefaultProject(ctx) defaultProject, err := e.getDefaultProject(ctx)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment