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

Revert "Revert "Add structured logging on top of seelog"" #2797

Merged
merged 1 commit into from
Jan 22, 2021

Conversation

angelcar
Copy link
Contributor

Summary

Logs in agent are very challenging to work with. This refactor aims to bring structured logs on top of seelong (for both, json and logfmt formats) for easier reading when debugging.

This PR only changes logs for task_manager.go as a PoC.

here's a sample of how the structured logs look like:

logfmt:

level=info time=2020-11-06T18:34:07Z msg="Waiting for any previous stops to complete" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896" Seq=53
level=info time=2020-11-06T18:34:07Z msg="Waiting for task event" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:07Z msg="Wait over; ready to move towards desired status" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896" desiredStatus="RUNNING"
level=info time=2020-11-06T18:34:07Z msg="Task not steady state or terminal; progressing it" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:07Z msg="Waiting for task event" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:07Z msg="Transitioned resource" resource="cgroup" FailedStatus="CREATED" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:07Z msg="Managed task got resource" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896" resource="cgroup" ResourceStatus="CREATED"
level=info time=2020-11-06T18:34:07Z msg="Task not steady state or terminal; progressing it" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:07Z msg="Waiting for task event" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:30Z msg="Handling container change event" status="PULLED" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896" container="ecs-exec-scratch" runtimeID=""
level=error time=2020-11-06T18:34:30Z msg="Error while pulling image; will try to run anyway" image="ecs-exec-test-scratch:latest" container="ecs-exec-scratch" error="Error response from daemon: pull access denied for ecs-exec-test-scratch, repository does not exist or may require 'docker login': denied: requested access to the resource is denied" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:30Z msg="Task not steady state or terminal; progressing it" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:30Z msg="Waiting for task event" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:30Z msg="Handling container change event" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896" container="ecs-exec-scratch" runtimeID="d2f07793ebceade429d970fb11dda52fce70c2882a940358a7e5d4d0fc61991d" status="CREATED"
level=info time=2020-11-06T18:34:30Z msg="Task not steady state or terminal; progressing it" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:30Z msg="Waiting for task event" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:30Z msg="Handling container change event" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896" container="ecs-exec-scratch" runtimeID="d2f07793ebceade429d970fb11dda52fce70c2882a940358a7e5d4d0fc61991d" status="RUNNING"
level=info time=2020-11-06T18:34:30Z msg="Sending container change event" ContainerName="ecs-exec-scratch" Reason="CannotPullContainerError: Error response from daemon: pull access denied for ecs-exec-test-scratch, repository does not exist or may require 'docker login': denied: requested access to the resource is denied" KnownSent="NONE" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:30Z msg="Sent container change event" ContainerName="ecs-exec-scratch" Reason="CannotPullContainerError: Error response from daemon: pull access denied for ecs-exec-test-scratch, repository does not exist or may require 'docker login': denied: requested access to the resource is denied" KnownSent="NONE" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:30Z msg="Task not steady state or terminal; progressing it" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:30Z msg="Waiting for task event" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:30Z msg="Handling container change event" runtimeID="d2f07793ebceade429d970fb11dda52fce70c2882a940358a7e5d4d0fc61991d" status="RUNNING" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896" container="ecs-exec-scratch"
level=info time=2020-11-06T18:34:30Z msg="Container change is redundant" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896" container="ecs-exec-scratch" runtimeID="d2f07793ebceade429d970fb11dda52fce70c2882a940358a7e5d4d0fc61991d" status="RUNNING" knownStatus="RUNNING"
level=info time=2020-11-06T18:34:30Z msg="Task not steady state or terminal; progressing it" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:30Z msg="Waiting for task event" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:32Z msg="Handling container change event" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896" container="ecs-exec-alpine" runtimeID="" status="PULLED"
level=error time=2020-11-06T18:34:32Z msg="Error while pulling image; will try to run anyway" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896" image="ecs-exec-test-alpine:latest" container="ecs-exec-alpine" error="Error response from daemon: pull access denied for ecs-exec-test-alpine, repository does not exist or may require 'docker login': denied: requested access to the resource is denied"
level=info time=2020-11-06T18:34:32Z msg="Task not steady state or terminal; progressing it" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:32Z msg="Waiting for task event" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:32Z msg="Handling container change event" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896" container="ecs-exec-alpine" runtimeID="dc8aa461726bae9475d90b93455ad9fc3e7678e16e48f68a93c62bda1d95d06a" status="CREATED"
level=info time=2020-11-06T18:34:32Z msg="Container change also resulted in task change" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896" container="ecs-exec-alpine" runtimeID="dc8aa461726bae9475d90b93455ad9fc3e7678e16e48f68a93c62bda1d95d06a" desiredStatus="RUNNING"
level=info time=2020-11-06T18:34:32Z msg="Task not steady state or terminal; progressing it" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:32Z msg="Waiting for task event" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:32Z msg="Handling container change event" status="RUNNING" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896" container="ecs-exec-alpine" runtimeID="dc8aa461726bae9475d90b93455ad9fc3e7678e16e48f68a93c62bda1d95d06a"
level=info time=2020-11-06T18:34:32Z msg="Sending container change event" ContainerName="ecs-exec-alpine" Reason="CannotPullContainerError: Error response from daemon: pull access denied for ecs-exec-test-alpine, repository does not exist or may require 'docker login': denied: requested access to the resource is denied" KnownSent="NONE" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:32Z msg="Sent container change event" Reason="CannotPullContainerError: Error response from daemon: pull access denied for ecs-exec-test-alpine, repository does not exist or may require 'docker login': denied: requested access to the resource is denied" KnownSent="NONE" ContainerName="ecs-exec-alpine" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:32Z msg="Container change also resulted in task change" container="ecs-exec-alpine" runtimeID="dc8aa461726bae9475d90b93455ad9fc3e7678e16e48f68a93c62bda1d95d06a" desiredStatus="RUNNING" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:32Z msg="Sending task change event" status="RUNNING" sentStatus="NONE" PullStartedAt="2020-11-06T18:34:07Z" PullStoppedAt="2020-11-06T18:34:32Z" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:32Z msg="Sent task change event" event="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896 -> RUNNING, Known Sent: NONE, PullStartedAt: 2020-11-06 18:34:07.753216567 +0000 UTC m=+21.240205141, PullStoppedAt: 2020-11-06 18:34:32.133468608 +0000 UTC m=+45.620457158, ExecutionStoppedAt: 0001-01-01 00:00:00 +0000 UTC" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:32Z msg="Managed task at steady state" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896" desiredStatus="RUNNING" knownStatus="RUNNING"
level=info time=2020-11-06T18:34:32Z msg="Waiting for task event" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"
level=info time=2020-11-06T18:34:32Z msg="Handling container change event" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896" container="ecs-exec-alpine" runtimeID="dc8aa461726bae9475d90b93455ad9fc3e7678e16e48f68a93c62bda1d95d06a" status="RUNNING"
level=info time=2020-11-06T18:34:32Z msg="Container change is redundant" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896" container="ecs-exec-alpine" runtimeID="dc8aa461726bae9475d90b93455ad9fc3e7678e16e48f68a93c62bda1d95d06a" status="RUNNING" knownStatus="RUNNING"
level=info time=2020-11-06T18:34:32Z msg="Managed task at steady state" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896" desiredStatus="RUNNING" knownStatus="RUNNING"
level=info time=2020-11-06T18:34:32Z msg="Waiting for task event" taskARN="arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/e93391b4b262436da2fdb9ae64670896"

json:

{"level":"info","time":"2020-11-06T22:25:01Z","msg":"Waiting for any previous stops to complete","Seq":64,"taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:01Z","msg":"Waiting for task event","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:01Z","msg":"Wait over; ready to move towards desired status","desiredStatus":"RUNNING","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:01Z","msg":"Task not steady state or terminal; progressing it","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:01Z","msg":"Waiting for task event","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:01Z","msg": "Creating cgroup /ecs/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:01Z","msg":"Transitioned resource","resource":"cgroup","FailedStatus":"CREATED","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:01Z","msg":"Managed task got resource","ResourceStatus":"CREATED","resource":"cgroup","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:01Z","msg":"Task not steady state or terminal; progressing it","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:01Z","msg":"Waiting for task event","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:22Z","msg":"Handling container change event","container":"ecs-exec-alpine","runtimeID":"","status":"PULLED","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"error","time":"2020-11-06T22:25:22Z","msg":"Error while pulling image; will try to run anyway","container":"ecs-exec-alpine","error":{"FromError":{}},"image":"ecs-exec-test-alpine:latest","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:22Z","msg":"Task not steady state or terminal; progressing it","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:22Z","msg":"Waiting for task event","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:22Z","msg":"Handling container change event","container":"ecs-exec-alpine","runtimeID":"042d40635129ab72b858ecc2fe39929f7e90c0f7a01180b5a9a012f9a82f911f","status":"CREATED","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:22Z","msg":"Task not steady state or terminal; progressing it","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:22Z","msg":"Waiting for task event","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:22Z","msg":"Handling container change event","container":"ecs-exec-alpine","runtimeID":"042d40635129ab72b858ecc2fe39929f7e90c0f7a01180b5a9a012f9a82f911f","status":"RUNNING","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:22Z","msg":"Sending container change event","ContainerName":"ecs-exec-alpine","KnownSent":"NONE","Reason":"CannotPullContainerError: Error response from daemon: pull access denied for ecs-exec-test-alpine, repository does not exist or may require 'docker login': denied: requested access to the resource is denied","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:22Z","msg":"Sent container change event","ContainerName":"ecs-exec-alpine","KnownSent":"NONE","Reason":"CannotPullContainerError: Error response from daemon: pull access denied for ecs-exec-test-alpine, repository does not exist or may require 'docker login': denied: requested access to the resource is denied","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:22Z","msg":"Task not steady state or terminal; progressing it","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:22Z","msg":"Waiting for task event","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:22Z","msg":"Handling container change event","container":"ecs-exec-alpine","runtimeID":"042d40635129ab72b858ecc2fe39929f7e90c0f7a01180b5a9a012f9a82f911f","status":"RUNNING","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}
{"level":"info","time":"2020-11-06T22:25:22Z","msg":"Container change is redundant","container":"ecs-exec-alpine","knownStatus":"RUNNING","runtimeID":"042d40635129ab72b858ecc2fe39929f7e90c0f7a01180b5a9a012f9a82f911f","status":"RUNNING","taskARN":"arn:aws:ecs:us-west-2:901447253822:task/B85D1C69-774E-4779-8258-054137F597C7/84f7be9bde55426cb65325a9e8fbfa13"}

Implementation details

The best course of action I found was to wrap seelog with a custom logger designed to just format the message part of seelog logger. The API had to change in order to add structured fields since seelog doesn't support those (it's possible through custom contexts, but this approach is too expensive and leaks file descriptors).

To see how the new wrapper would be used, see task_manager.go in this PR.

Testing

  • UTs for all new code
  • Manual tests to verify desired output visually
  • Benckmarks to verify no performance degradation

New tests cover the changes:

Description for the changelog

  • Implementation of structured logs on top of seelog.

A log in logfmt format that looked like this:

level=info time=2020-11-17T23:37:53Z msg="Managed task [arn:aws:ecs:us-west-2:901447253822:task/ecs-exec-gamma/776f36ce708c4701b196779d125d5104]: Container [name=ecs-exec-alpine runtimeID=0d2799a853ebf2bd4bff7c2620c31d836ef457f31ff96fc9730e52633e536a35]: handling container change event [CREATED]" module=task_manager.go

Will now look like:

level=info time=2020-11-17T23:37:53Z msg="handling container change event" taskArn="arn:aws:ecs:us-west-2:901447253822:task/ecs-exec-gamma/776f36ce708c4701b196779d125d5104" container="ecs-exec-alpine" runtimeID="0d2799a853ebf2bd4bff7c2620c31d836ef457f31ff96fc9730e52633e536a35" status="CREATED" module=task_manager.go

and for json format, it will change from:

{"level":"info", "time":"2020-11-06T22:25:01Z", "msg":"Managed task [arn:aws:ecs:us-west-2:901447253822:task/ecs-exec-gamma/776f36ce708c4701b196779d125d5104]: Container [name=ecs-exec-alpine runtimeID=0d2799a853ebf2bd4bff7c2620c31d836ef457f31ff96fc9730e52633e536a35]: handling container change event [CREATED]", "module":"task_manager.go"}

to:

{"level":"info","time":"2020-11-06T22:25:01Z","msg":"handling container change event","taskArn":"arn:aws:ecs:us-west-2:901447253822:task/ecs-exec-gamma/776f36ce708c4701b196779d125d5104","container":"ecs-exec-alpine","runtimeID":"0d2799a853ebf2bd4bff7c2620c31d836ef457f31ff96fc9730e52633e536a35","status":"CREATED" }

Licensing

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

shubham2892
shubham2892 previously approved these changes Jan 20, 2021
Realmonia
Realmonia previously approved these changes Jan 20, 2021
shubham2892
shubham2892 previously approved these changes Jan 20, 2021
@angelcar angelcar merged commit a1f3053 into aws:dev Jan 22, 2021
@shubham2892 shubham2892 added this to the 1.50.1 milestone Feb 10, 2021
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.

6 participants