Fix trace ID in error message (#78041)

This commit is contained in:
Fabrizio 2023-11-13 14:31:19 +01:00 committed by GitHub
parent deea9a7243
commit edde17741d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,7 +78,7 @@ func (s *Service) getTrace(ctx context.Context, pCtx backend.PluginContext, quer
if resp.StatusCode != http.StatusOK {
ctxLogger.Error("Failed to get trace", "error", err, "function", logEntrypoint())
result.Error = fmt.Errorf("failed to get trace with id: %v Status: %s Body: %s", model.Query, resp.Status, string(body))
result.Error = fmt.Errorf("failed to get trace with id: %s Status: %s Body: %s", *model.Query, resp.Status, string(body))
span.RecordError(result.Error)
span.SetStatus(codes.Error, result.Error.Error())
return result, nil