Skip to content

Commit

Permalink
[receiver/influxdb] Update success write response code (#6530)
Browse files Browse the repository at this point in the history
* update influx success write response as 204

Signed-off-by: Jeeva Kandasamy <jkandasa@gmail.com>

* update influx receiver readme

Signed-off-by: Jeeva Kandasamy <jkandasa@gmail.com>

* Update receiver/influxdbreceiver/README.md

Co-authored-by: Juraci Paixão Kröhling <juraci.github@kroehling.de>

Co-authored-by: Juraci Paixão Kröhling <juraci.github@kroehling.de>
  • Loading branch information
jkandasa and jpkrohling authored Jan 3, 2022
1 parent 3dfb709 commit 262fbdb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion receiver/influxdbreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Write query parameters `db`/`rp` (InfluxDB 1.x) and `org`/`bucket` (InfluxDB 2.x
Write query parameter `precision` is optional, defaults to `ns`.

Write responses:
- 202: write accepted
- 204: success, no further response needed (no content)
- 400: permanent failure; check response body for details
- 500: retryable error; check response body for details

Expand Down
2 changes: 1 addition & 1 deletion receiver/influxdbreceiver/receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,5 +181,5 @@ func (r *metricsReceiver) handleWrite(w http.ResponseWriter, req *http.Request)
return
}

w.WriteHeader(http.StatusAccepted)
w.WriteHeader(http.StatusNoContent)
}

0 comments on commit 262fbdb

Please sign in to comment.