Skip to content

Commit

Permalink
spawn/Stats: add counters for killed and exited processes
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Jul 26, 2024
1 parent 6f366ce commit 5f8a48e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libcommon
10 changes: 10 additions & 0 deletions src/prometheus/SpawnStats.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,25 @@ Write(GrowingBuffer &buffer, std::string_view process,
# HELP beng_proxy_spawn_errors Total number of child processes that failed to spawn
# TYPE beng_proxy_spawn_errors counter
# HELP beng_proxy_children_killed Total number of child processes that were killed with a signal
# TYPE beng_proxy_children_killed counter
# HELP beng_proxy_children_exited Total number of child processes that have exited
# TYPE beng_proxy_children_exited counter
# HELP beng_proxy_children Number of child processes
# TYPE beng_proxy_children gauge
beng_proxy_children_spawned{{process={:?}}} {}
beng_proxy_spawn_errors{{process={:?}}} {}
beng_proxy_children_killed{{process={:?}}} {}
beng_proxy_children_exited{{process={:?}}} {}
beng_proxy_children{{process={:?}}} {}
)"sv,
process, stats.spawned,
process, stats.errors,
process, stats.killed,
process, stats.exited,
process, stats.alive);
}

Expand Down

0 comments on commit 5f8a48e

Please sign in to comment.