fix: timestamp format in logs#205
Conversation
|
From experience this kind of changes can be very dangerous. For multiple reasons. I'm not that worried about CloudWatch compatibility (we can always ask @luben for that) Imagine a customer creating a script to analyze some logs and expecting a strict format, or worse blindly exporting the logs to another database with a strict schema. My idea here is that we should opt-in the new format, so the customer won't be surprised by the change. |
|
Also I think this is also highlighting a design flaw. The RIC should not be concerned with the time format. It should flush to the sink the biggest possible epoch and CW should do the conversion to human readable time. |
| _DATETIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ" | ||
| _DATETIME_FORMAT = "%Y-%m-%dT%H:%M:%S" |
There was a problem hiding this comment.
Is this used by any other code? I nothing else is using it we can just append .%f here.
Issue #, if available:
#156
Description of changes:
In
awslambdaric/lambda_runtime_log_utils.pyThis produces timestamps like 2024-06-19T23:13:05.068Z — matching the platform log format.
Testing:
Before

After

Target (OCI, Managed Runtime, both):
Both
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.