mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-21 05:54:10 +08:00
[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:
co-authored by
Claude Sonnet 4.6
parent
39d25d94dd
commit
9aae84bc3f
@@ -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)
|
||||
|
||||
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user