-
Notifications
You must be signed in to change notification settings - Fork 53
Feat: Add pod start and finish time in RFC3339 time format to logging link templating variables #minor #360
Conversation
Signed-off-by: Fabio Graetz <[email protected]>
Signed-off-by: Fabio Graetz <[email protected]>
0331ba7
to
6382a66
Compare
Codecov Report
@@ Coverage Diff @@
## master #360 +/- ##
==========================================
+ Coverage 62.62% 64.00% +1.37%
==========================================
Files 152 152
Lines 12789 10375 -2414
==========================================
- Hits 8009 6640 -1369
+ Misses 4168 3123 -1045
Partials 612 612
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic! Should be pretty easy to add ISO 8601 format as well right? Would wrap up this issue.
Unfortunately, go appears to not have the Users on stackoverflow recommend to use rfc3339 as a proxy for 8601 (see reply to this answer):
However, this answer suggests that not everything that is allowed by RFC3339 is allowed by ISO 8601 and vice versa. That being said, a RFC3339 timestamp propeller generates based on this PR is e.g. So it seems that We could use our own ISO8601 format string (see here) even though I couldn't confirm this format string is correct. Alternatively, we could leave it with RFC3339 and in the documentation explain that it is valid also for ISO 8601. This would be my suggestion. What do you think @hamersaw ? |
Sounds great to me! Thanks for the depth. |
… link templating variables #minor (#360) * Add RFC3339 time format log link vars for start and finish time Signed-off-by: Fabio Graetz <[email protected]> * Add RFC3339 timestamp to log link generation tests Signed-off-by: Fabio Graetz <[email protected]> --------- Signed-off-by: Fabio Graetz <[email protected]>
TL;DR
Currently, the the pod start and finish time in unix time format (seconds since 1970) can be used to template logging links.
This time format cannot be used in combination with google cloud logging. Instead, GCP logging requires timestamps in RFC3339 format:
This PR adds the pod start and finish time in this format to the variables available for templating logging links.
Type
Are all requirements met?
Complete description
NA
Tracking Issue
NA
Follow-up issue
NA