Skip to content

Commit 4c72228

Browse files
wadaweatoulme
andauthored
[receiver/influxdbreceiver] update receiver.go to add better log messages (#38357)
A simple change to propagate error messages for better debug logging purposes. <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This change looks to improve logging messages to help in debugging. <!-- Issue number (e.g. #1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes bad logging... <!--Describe what testing was performed and which tests were added.--> #### Testing No tests needed. Just a single string update. <!--Describe the documentation added.--> #### Documentation <!--Please delete paragraphs that you did not use before submitting.--> --------- Co-authored-by: Antoine Toulme <[email protected]> Co-authored-by: Antoine Toulme <[email protected]>
1 parent ce41a23 commit 4c72228

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

receiver/influxdbreceiver/receiver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ func (r *metricsReceiver) handleWrite(w http.ResponseWriter, req *http.Request)
184184
err = batch.AddPoint(string(measurement), tags, fields, ts, common.InfluxMetricValueTypeUntyped)
185185
if err != nil {
186186
w.WriteHeader(http.StatusBadRequest)
187-
_, _ = fmt.Fprintf(w, "failed to append to the batch")
187+
_, _ = fmt.Fprintf(w, "failed to append to the batch: %v", err)
188188
return
189189
}
190190
}

0 commit comments

Comments
 (0)