diff --git a/pkg/druid.go b/pkg/druid.go index 7854553..905f1b3 100644 --- a/pkg/druid.go +++ b/pkg/druid.go @@ -153,7 +153,7 @@ type grafanaMetricFindValue struct { } func (ds *druidDatasource) QueryVariableData(ctx context.Context, req *backend.CallResourceRequest) ([]grafanaMetricFindValue, error) { - log.DefaultLogger.Info("QUERY VARIABLE", "_________________________REQ___________________________", string(req.Body)) + log.DefaultLogger.Debug("QUERY VARIABLE", "_________________________REQ___________________________", string(req.Body)) s, err := ds.settings(req.PluginContext) if err != nil { return []grafanaMetricFindValue{}, err @@ -162,21 +162,21 @@ func (ds *druidDatasource) QueryVariableData(ctx context.Context, req *backend.C } func (ds *druidDatasource) queryVariable(qry []byte, s *druidInstanceSettings) ([]grafanaMetricFindValue, error) { - log.DefaultLogger.Info("DRUID EXECUTE QUERY VARIABLE", "_________________________GRAFANA QUERY___________________________", string(qry)) + log.DefaultLogger.Debug("DRUID EXECUTE QUERY VARIABLE", "_________________________GRAFANA QUERY___________________________", string(qry)) // feature: probably implement a short (1s ? 500ms ? configurable in datasource ? beware memory: constrain size ?) life cache (druidInstanceSettings.cache ?) and early return then response := []grafanaMetricFindValue{} q, stg, err := ds.prepareQuery(qry, s) if err != nil { return response, err } - log.DefaultLogger.Info("DRUID EXECUTE QUERY VARIABLE", "_________________________DRUID QUERY___________________________", q) + log.DefaultLogger.Debug("DRUID EXECUTE QUERY VARIABLE", "_________________________DRUID QUERY___________________________", q) r, err := ds.executeQuery("variable", q, s, stg) if err != nil { return response, err } - log.DefaultLogger.Info("DRUID EXECUTE QUERY VARIABLE", "_________________________DRUID RESPONSE___________________________", r) + log.DefaultLogger.Debug("DRUID EXECUTE QUERY VARIABLE", "_________________________DRUID RESPONSE___________________________", r) response, err = ds.prepareVariableResponse(r, stg) - log.DefaultLogger.Info("DRUID EXECUTE QUERY VARIABLE", "_________________________GRAFANA RESPONSE___________________________", response) + log.DefaultLogger.Debug("DRUID EXECUTE QUERY VARIABLE", "_________________________GRAFANA RESPONSE___________________________", response) return response, err } @@ -289,7 +289,7 @@ func (ds *druidDatasource) settings(ctx backend.PluginContext) (*druidInstanceSe } func (ds *druidDatasource) query(qry backend.DataQuery, s *druidInstanceSettings) backend.DataResponse { - log.DefaultLogger.Info("DRUID EXECUTE QUERY", "_________________________GRAFANA QUERY___________________________", qry) + log.DefaultLogger.Debug("DRUID EXECUTE QUERY", "_________________________GRAFANA QUERY___________________________", qry) // feature: probably implement a short (1s ? 500ms ? configurable in datasource ? beware memory: constrain size ?) life cache (druidInstanceSettings.cache ?) and early return then response := backend.DataResponse{} q, stg, err := ds.prepareQuery(qry.JSON, s) @@ -297,19 +297,19 @@ func (ds *druidDatasource) query(qry backend.DataQuery, s *druidInstanceSettings response.Error = err return response } - log.DefaultLogger.Info("DRUID EXECUTE QUERY", "_________________________DRUID QUERY___________________________", q) + log.DefaultLogger.Debug("DRUID EXECUTE QUERY", "_________________________DRUID QUERY___________________________", q) r, err := ds.executeQuery(qry.RefID, q, s, stg) if err != nil { response.Error = err return response } - log.DefaultLogger.Info("DRUID EXECUTE QUERY", "_________________________DRUID RESPONSE___________________________", r) + log.DefaultLogger.Debug("DRUID EXECUTE QUERY", "_________________________DRUID RESPONSE___________________________", r) response, err = ds.prepareResponse(r, stg) if err != nil { // note: error could be set from prepareResponse but this gives a chance to react to error here response.Error = err } - log.DefaultLogger.Info("DRUID EXECUTE QUERY", "_________________________GRAFANA RESPONSE___________________________", response) + log.DefaultLogger.Debug("DRUID EXECUTE QUERY", "_________________________GRAFANA RESPONSE___________________________", response) return response }