awslabs / node-latency-for-k8s

The node-latency-for-k8s tool provides process-level telemetry via prometheus metrics, cloudwatch metrics, and markdown timing charts to optimized K8s node launch times.
Apache License 2.0
86 stars 10 forks source link

bug: year gets added if the year in the timestamp wasn't this year #160

Open hlatimer266 opened 8 months ago

hlatimer266 commented 8 months ago

ran into a situation when parsing timestamps for events that the year gets appended to timestamps if they were created in the previous year i.e. if the timestamp has 2023 but the current year is 2024 then 2024 gets appended and then the parse fails. you can also end up adding a year to a timestamp that was created last year which ends up throwing off calculated events times considerably. it would probably make sense to pull the year when the ec2 instance was requested / created early in the process and use this value to check / add the year value.

hlatimer266 commented 8 months ago

@bwagner5 I added a fix for this in the PR for the OTeL emitter. I can also break it out into a separate PR if that helps