Skip to content

Commit

Permalink
server: use prometheus
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Jan 19, 2024
1 parent d56147d commit d9e5d99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/opentheory/tool/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(name trustee_ot)
(flags :standard -warn-error -a+8 -open Trustee_core.Sigs)
(libraries containers unix trustee.core trustee.sqlite logs
trustee-opentheory tiny_httpd))
trustee-opentheory tiny_httpd tiny_httpd.prometheus))

(rule
(targets static.ml)
Expand Down
3 changes: 2 additions & 1 deletion src/opentheory/tool/serve.ml
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ let h_stats self : unit =
reply_page ~title:"/stats" req [res]

let serve st ~port : unit =
let server = H.create ~port () in
let server = H.create ~addr:"0.0.0.0" ~port () in
Tiny_httpd_prometheus.(instrument_server server global);
let state = {server; st } in
h_root state;
h_thy state;
Expand Down

0 comments on commit d9e5d99

Please sign in to comment.