@@ -63,7 +63,8 @@ def start_process(event)
6363 attributes = {
6464 pid : process . pid ,
6565 hostname : process . hostname ,
66- process_id : process . process_id
66+ process_id : process . process_id ,
67+ name : process . name
6768 } . merge ( process . metadata )
6869
6970 info formatted_event ( event , action : "Started #{ process . kind } " , **attributes )
@@ -75,15 +76,16 @@ def shutdown_process(event)
7576 attributes = {
7677 pid : process . pid ,
7778 hostname : process . hostname ,
78- process_id : process . process_id
79+ process_id : process . process_id ,
80+ name : process . name
7981 } . merge ( process . metadata )
8082
8183 info formatted_event ( event , action : "Shutdown #{ process . kind } " , **attributes )
8284 end
8385
8486 def register_process ( event )
8587 process_kind = event . payload [ :kind ]
86- attributes = event . payload . slice ( :pid , :hostname , :process_id )
88+ attributes = event . payload . slice ( :pid , :hostname , :process_id , :name )
8789
8890 if error = event . payload [ :error ]
8991 warn formatted_event ( event , action : "Error registering #{ process_kind } " , **attributes . merge ( error : formatted_error ( error ) ) )
@@ -99,6 +101,7 @@ def deregister_process(event)
99101 process_id : process . id ,
100102 pid : process . pid ,
101103 hostname : process . hostname ,
104+ name : process . name ,
102105 last_heartbeat_at : process . last_heartbeat_at . iso8601 ,
103106 claimed_size : event . payload [ :claimed_size ] ,
104107 pruned : event . payload [ :pruned ]
@@ -147,7 +150,7 @@ def replace_fork(event)
147150 termsig : status . termsig
148151
149152 if replaced_fork = event . payload [ :fork ]
150- info formatted_event ( event , action : "Replaced terminated #{ replaced_fork . kind } " , **attributes . merge ( hostname : replaced_fork . hostname ) )
153+ info formatted_event ( event , action : "Replaced terminated #{ replaced_fork . kind } " , **attributes . merge ( hostname : replaced_fork . hostname , name : replaced_fork . name ) )
151154 else
152155 warn formatted_event ( event , action : "Tried to replace forked process but it had already died" , **attributes )
153156 end
0 commit comments