@@ -11,8 +11,6 @@ import (
1111 "os"
1212 "runtime"
1313 "time"
14-
15- "github.com/k0kubun/pp"
1614)
1715
1816const apiPathForAgentSetting = "api/v1/agent/public/setting/"
@@ -75,7 +73,6 @@ func GetAgentReportValue() (AgentReportValue, error) {
7573 }
7674
7775 nodeProcs , err := FindAllNodeProcesses (ctx )
78- pp .Println ("All node procs:" )
7976 // pp.Println(nodeProcs)
8077 // --- 2. Convert to AgentReportValue (ServiceSetting) ---
8178 osKey := runtime .GOOS
@@ -100,7 +97,6 @@ func GetAgentReportValue() (AgentReportValue, error) {
10097 }
10198 for _ , proc := range nodeProcs {
10299 setting := convertNodeProcessToServiceSetting (proc )
103- pp .Println ("node procs: " , proc )
104100 settings [setting .Key ] = setting
105101 }
106102
@@ -147,16 +143,19 @@ func convertNodeProcessToServiceSetting(proc NodeProcess) ServiceSetting {
147143 }
148144
149145 return ServiceSetting {
150- PID : int (proc .ProcessPID ),
151- ServiceName : proc .ServiceName ,
152- Status : proc .Status ,
153- Enabled : true ,
154- ServiceType : serviceType , // Now correctly reports "docker"
155- Language : "node" ,
156- RuntimeVersion : proc .ProcessRuntimeVersion ,
157- AgentPath : proc .NodeAgentPath ,
158- Instrumented : proc .HasNodeAgent ,
159- Key : key ,
146+ PID : int (proc .ProcessPID ),
147+ ServiceName : proc .ServiceName ,
148+ Owner : proc .ProcessOwner ,
149+ Status : proc .Status ,
150+ Enabled : true ,
151+ ServiceType : serviceType , // Now correctly reports "docker"
152+ Language : "node" ,
153+ RuntimeVersion : proc .ProcessRuntimeVersion ,
154+ HasAgent : proc .HasNodeAgent ,
155+ IsMiddlewareAgent : proc .IsMiddlewareAgent ,
156+ AgentPath : proc .NodeAgentPath ,
157+ Instrumented : proc .HasNodeAgent ,
158+ Key : key ,
160159 }
161160}
162161
0 commit comments