-
Notifications
You must be signed in to change notification settings - Fork 1
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
Hotfix/timestamp mismatch for logs #149
Conversation
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.
Good finding Hamza. I've approved it, but also suggested a change that you can accept if you want to. Just tidyness/nitpicking.
apps/views.py
Outdated
if settings.DEBUG is True: | ||
prod_timestamp = False | ||
else: | ||
prod_timestamp = True |
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.
Seems a bit unnecessary to create a boolean from a boolean, then use the boolean to do boolean stuff :) I suggest remove this, and commit my suggestion from below
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.
Yeah makes sense. I had it in my mind to change this in the morning, got too tired last night.
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.
Understandable :)
Co-authored-by: Viktor Sandström <v.sandstrom@icloud.com>
Co-authored-by: Viktor Sandström <v.sandstrom@icloud.com>
Hotfix for logs not working in production environment. Dev cluster timestamps from containers are of the format 2024-02-08T11:36:10.49903621Z and from prod the format is "2024-02-08T15:22:46.160554532+01:00". Patched it to handle this now using DEBUG option from settings. Needs to be addressed in a later release to use different timestamps options from Loki. Jira link SS-926.
Checklist
If you're unsure about any of the items below, don't hesitate to ask. We're here to help!
This is simply a reminder of what we are going to look for before merging your code.