[MM-67981] Add process ID (PID) to support packet diagnostics (#35832)

Populate server.process_id in diagnostics.yaml using os.Getpid(), making it easier to correlate support packet data with OS-level logs and confirm whether the server was restarted between an incident and packet generation.

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ben Schumacher
2026-04-21 11:00:41 +02:00
committed by GitHub
co-authored by Claude Sonnet 4.6
parent 39d25d94dd
commit 9aae84bc3f
3 changed files with 3 additions and 0 deletions
@@ -117,6 +117,7 @@ func (ps *PlatformService) getSupportPacketDiagnostics(rctx request.CTX) (*model
installationType = unknownDataPoint
}
d.Server.InstallationType = installationType
d.Server.ProcessID = os.Getpid()
/* Config */
d.Config.Source = ps.DescribeConfig()
@@ -209,6 +209,7 @@ func TestGetSupportPacketDiagnostics(t *testing.T) {
assert.Equal(t, "docker", d.Server.InstallationType)
assert.Positive(t, d.Server.CPUCores)
assert.Positive(t, d.Server.TotalMemoryMB)
assert.Positive(t, d.Server.ProcessID)
/* Config */
assert.Equal(t, "memory://", d.Config.Source)
+1
View File
@@ -30,6 +30,7 @@ type SupportPacketDiagnostics struct {
CPUCores int `yaml:"cpu_cores"`
TotalMemoryMB uint64 `yaml:"total_memory_mb"`
Hostname string `yaml:"hostname"`
ProcessID int `yaml:"process_id"`
Version string `yaml:"version"`
BuildHash string `yaml:"build_hash"`
InstallationType string `yaml:"installation_type"`