Skip to content

Commit

Permalink
[#366] Fix /metrics endpoint does not produce correct output
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitabugrovsky authored and jesperpedersen committed Apr 17, 2023
1 parent 809d398 commit e454e47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libpgagroal/prometheus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,7 @@ general_information(int client_fd)
data = append(data, "\n\n");

data = append(data, "#HELP pgagroal_query_count The number of queries\n");
data = append(data, "#TYPE pgagroal_query_count count\n");
data = append(data, "#TYPE pgagroal_query_count counter\n");
data = append(data, "pgagroal_query_count ");
data = append_ullong(data, atomic_load(&prometheus->query_count));
data = append(data, "\n\n");
Expand Down Expand Up @@ -1451,7 +1451,7 @@ general_information(int client_fd)
data = append(data, "\n");

data = append(data, "#HELP pgagroal_tx_count The number of transactions\n");
data = append(data, "#TYPE pgagroal_tx_count count\n");
data = append(data, "#TYPE pgagroal_tx_count counter\n");
data = append(data, "pgagroal_tx_count ");
data = append_ullong(data, atomic_load(&prometheus->tx_count));
data = append(data, "\n\n");
Expand Down

0 comments on commit e454e47

Please sign in to comment.