[v10.2.x] Loki: Fix nil pointer in api.go (#78729)
Loki: Fix nil pointer in api.go (#78727)
(cherry picked from commit 777d119a80)
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
This commit is contained in:
1 parent
b88c8b3705
commit
834a910606
1 file changed
+1
-1
@@ -208,7 +208,7 @@ func (api *LokiAPI) DataQuery(ctx context.Context, query lokiQuery, responseOpts
|
||||
|
||||
if res.Error != nil {
|
||||
span.RecordError(res.Error)
|
||||
span.SetStatus(codes.Error, err.Error())
|
||||
span.SetStatus(codes.Error, res.Error.Error())
|
||||
instrumentation.UpdatePluginParsingResponseDurationSeconds(ctx, time.Since(start), "error")
|
||||
api.log.Error("Error parsing response from loki", "error", res.Error, "metricDataplane", responseOpts.metricDataplane, "duration", time.Since(start), "stage", stageParseResponse)
|
||||
return nil, res.Error
|
||||
|
||||
Reference in new issue
Block a user