Skip to content

Commit

Permalink
fix: Use correct writer
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
  • Loading branch information
mrueg committed Mar 27, 2023
1 parent 6eadca8 commit aebe410
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/metricshandler/metrics_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func (m *MetricsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {

// If we send openmetrics, we need to include a EOF directive
if contentType == expfmt.FmtOpenMetrics {
w.Write([]byte("# EOF\n"))
writer.Write([]byte("# EOF\n"))
}

// In case we gzipped the response, we have to close the writer.
Expand Down

0 comments on commit aebe410

Please sign in to comment.