Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More structured logging for Task object #3677

Merged
merged 1 commit into from
May 10, 2023
Merged

Conversation

sparrc
Copy link
Contributor

@sparrc sparrc commented May 5, 2023

also downgrade log message 'Adding a state change event to send' to DEBUG from INFO, since this log message is redundantly logged twice whenever there is a state change, since we also log the state change when we send it to ECS, like this:

level=info time=2023-05-05T22:17:23Z msg="TaskHandler: Adding a state change event to send batched container/managed agent events: arn:aws:ecs:us-west-2:XXX:task/usw2/XXX -> RUNNING, Known Sent: RUNNING, PullStartedAt: 2023-05-05 22:16:44.14108352 +0000 UTC m=+435.253624196, PullStoppedAt: 2023-05-05 22:16:44.3532973 +0000 UTC m=+435.465837967, ExecutionStoppedAt: 0001-01-01 00:00:00 +0000 UTC" module=task_handler.go
level=info time=2023-05-05T22:17:23Z msg="Sending state change to ECS" taskArn="arn:aws:ecs:us-west-2:XXX:task/usw2/XXX" taskStatus="RUNNING" taskReason="" taskPullStartedAt="2023-05-05T22:16:44Z" eventType="TaskStateChange" taskKnownSentStatus="RUNNING" taskPullStoppedAt="2023-05-05T22:16:44Z" taskExecutionStoppedAt="0001-01-01T00:00:00Z" containerChange-0="containerName=nonessential containerStatus=STOPPED containerExitCode=0 containerKnownSentStatus=RUNNING containerRuntimeID=9bd88a86abd927421788d5aae9c4ec95b42b16e6d98a5b43940f084b60a1a91d containerIsEssential=false"

Testing

make release and run

Description for the changelog

NA

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sparrc sparrc requested a review from a team as a code owner May 5, 2023 22:37
also downgrade log message 'Adding a state change event to send' to
DEBUG from INFO, since this log message is redundantly logged twice
whenever there is a state change, since we also log the state change
when we send it to ECS, like this:

```
level=info time=2023-05-05T22:17:23Z msg="TaskHandler: Adding a state change event to send batched container/managed agent events: arn:aws:ecs:us-west-2:039193556298:task/usw2/0b670ab4398f4f138e1bad9293f563a0 -> RUNNING, Known Sent: RUNNING, PullStartedAt: 2023-05-05 22:16:44.14108352 +0000 UTC m=+435.253624196, PullStoppedAt: 2023-05-05 22:16:44.3532973 +0000 UTC m=+435.465837967, ExecutionStoppedAt: 0001-01-01 00:00:00 +0000 UTC" module=task_handler.go
level=info time=2023-05-05T22:17:23Z msg="Sending state change to ECS" taskArn="arn:aws:ecs:us-west-2:039193556298:task/usw2/0b670ab4398f4f138e1bad9293f563a0" taskStatus="RUNNING" taskReason="" taskPullStartedAt="2023-05-05T22:16:44Z" eventType="TaskStateChange" taskKnownSentStatus="RUNNING" taskPullStoppedAt="2023-05-05T22:16:44Z" taskExecutionStoppedAt="0001-01-01T00:00:00Z" containerChange-0="containerName=nonessential containerStatus=STOPPED containerExitCode=0 containerKnownSentStatus=RUNNING containerRuntimeID=9bd88a86abd927421788d5aae9c4ec95b42b16e6d98a5b43940f084b60a1a91d containerIsEssential=false"
```
@sparrc sparrc merged commit c5de40d into aws:dev May 10, 2023
@ubhattacharjya ubhattacharjya mentioned this pull request May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants