diff --git a/app/peerfinder/http.go b/app/peerfinder/http.go index 03c694b..7776434 100644 --- a/app/peerfinder/http.go +++ b/app/peerfinder/http.go @@ -179,7 +179,7 @@ func (s *service) getPending(w http.ResponseWriter, r *http.Request, peerID stri return nil }) if err != nil { - span.RecordError(err) + span.AddEvent(err.Error()) w.WriteHeader(http.StatusNotFound) return } @@ -204,7 +204,7 @@ func (s *service) getPending(w http.ResponseWriter, r *http.Request, peerID stri peerResults.SetStreamID(aggPeer(peerID)) err = s.es.Load(ctx, peerResults) if err != nil && !errors.Is(err, ev.ErrNotFound) { - span.RecordError(fmt.Errorf("peer not found: %w", err)) + span.AddEvent("peer not found") w.WriteHeader(http.StatusNotFound) return } @@ -222,7 +222,7 @@ func (s *service) getPending(w http.ResponseWriter, r *http.Request, peerID stri } } if req == nil { - span.RecordError(fmt.Errorf("request not found")) + span.AddEvent("request not found") w.WriteHeader(http.StatusNoContent) return }