From b6f145f6e76292bb1bd48dba0b22789dbb56c6a8 Mon Sep 17 00:00:00 2001 From: sjpalf <18111914+sjpalf@users.noreply.github.com> Date: Wed, 27 Nov 2024 16:55:01 +0000 Subject: [PATCH 1/2] Rename duplicate time field to be more descriptive and unique --- agent/api/task/task.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/agent/api/task/task.go b/agent/api/task/task.go index 1426bf96562..1baf2f276d8 100644 --- a/agent/api/task/task.go +++ b/agent/api/task/task.go @@ -3006,9 +3006,9 @@ func (task *Task) RecordExecutionStoppedAt(container *apicontainer.Container) { return } logger.Info("Essential container stopped; recording task stopped time", logger.Fields{ - field.TaskID: task.GetID(), - field.Container: container.Name, - field.Time: now.String(), + field.TaskID: task.GetID(), + field.Container: container.Name, + field.ExecutionStoppedAt: now.String(), }) } From 6a7ba60acb24d9f94ea949c8bc84e3aac5c52dad Mon Sep 17 00:00:00 2001 From: sjpalf <18111914+sjpalf@users.noreply.github.com> Date: Mon, 9 Dec 2024 10:51:27 +0000 Subject: [PATCH 2/2] Replace Time logger field with ExecutionStoppedAt --- ecs-agent/logger/field/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecs-agent/logger/field/constants.go b/ecs-agent/logger/field/constants.go index 2b6388d024f..7efc25a7ac0 100644 --- a/ecs-agent/logger/field/constants.go +++ b/ecs-agent/logger/field/constants.go @@ -34,7 +34,6 @@ const ( Event = "event" Image = "image" Volume = "volume" - Time = "time" NetworkMode = "networkMode" Cluster = "cluster" ServiceName = "ServiceName" @@ -72,4 +71,5 @@ const ( CommandString = "commandString" CommandOutput = "commandOutput" RegistryID = "registryID" + ExecutionStoppedAt = "executionStoppedAt" )