fix: Use correct writer

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
This commit is contained in:
Manuel Rüger 2023-03-27 17:20:52 +02:00
parent 6eadca823e
commit aebe4103f8
1 changed files with 1 additions and 1 deletions

View File

@ -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.