Chore: Update prometheus, loki, graphite and influx plugins to support contextual logs. (#57708)

This commit is contained in:
Yuriy Tseretyan
2022-10-27 12:05:06 -04:00
committed by GitHub
parent 9aac0d32f9
commit facf2b1ee8
21 changed files with 149 additions and 142 deletions
+3 -2
View File
@@ -10,15 +10,16 @@ import (
"github.com/grafana/grafana-plugin-sdk-go/backend"
"github.com/grafana/grafana-plugin-sdk-go/data"
jsoniter "github.com/json-iterator/go"
"github.com/grafana/grafana/pkg/tsdb/prometheus/models"
"github.com/grafana/grafana/pkg/util/converter"
jsoniter "github.com/json-iterator/go"
)
func (s *QueryData) parseResponse(ctx context.Context, q *models.Query, res *http.Response) (*backend.DataResponse, error) {
defer func() {
if err := res.Body.Close(); err != nil {
s.log.Error("Failed to close response body", "err", err)
s.log.FromContext(ctx).Error("Failed to close response body", "err", err)
}
}()