opentelemetry-lambda icon indicating copy to clipboard operation
opentelemetry-lambda copied to clipboard

Info log message with error property on successful lambda shutdown

Open zaharsantarovich opened this issue 2 years ago • 0 comments

Describe the bug For each lambda shutdown, I have the following log messages in CloudWatch: 2023-02-13T13:19:10.621+01:00 {"level":"info","ts":1676290750.6216786,"logger":"lifecycleManager","msg":"Received SHUTDOWN event"} 2023-02-13T13:19:10.621+01:00 {"level":"info","ts":1676290750.6218555,"logger":"telemetryAPI.Listener","msg":"HTTP Server closed:","error":"http: Server closed"} The second log info message contains an error property. This message is generated by the Telemetry API HTTP server: https://github.com/open-telemetry/opentelemetry-lambda/blob/4232b61da1154b2219bdc897266cf95e706cd062/collector/internal/telemetryapi/listener.go#L73 It looks like the shutdown completes successfully, but I see an error property in the info message. So, the log message is a bit confusing for now.

Steps to reproduce Execute any lambda with ADOT Lambda layers v0.68. Wait for lambda shutdown and check shutdown logs.

What did you expect to see? No error properties in logs if shutdown completes successfully.

What did you see instead? Info message with the error property.

What version of collector/language SDK version did you use? Version: v0.68

What language layer did you use? Config: .NET

zaharsantarovich avatar Feb 14 '23 13:02 zaharsantarovich