Skip to content

Commit

Permalink
fix: 3xx codes are not errors
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Jan 24, 2024
1 parent 2576a63 commit 4783ac4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/prometheus/tiny_httpd_prometheus.ml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ let http_middleware (reg : Registry.t) : H.Middleware.t =
let elapsed_s = elapsed_us /. 1e6 in
Histogram.add h_latency elapsed_s;

if code < 200 || code >= 300 then Counter.incr c_err;
if code < 200 || code >= 400 then Counter.incr c_err;
resp response)

let add_route_to_server (server : H.t) (reg : registry) : unit =
Expand Down

0 comments on commit 4783ac4

Please sign in to comment.