-
Notifications
You must be signed in to change notification settings - Fork 18
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
should logjam_agent send time in application timezone? #32
Comments
See also: skaes/logjam_core#67 |
Unfortunately this a somewhat complicated topic. Allowing arbitrary time zones in the sender will require the logjam-importer (and quite possibly also the devices) to convert incoming time stamps between time zones. Do you by any chance know a C-libary for doing so? |
I totally agree that it's complicated and no, unfortunately I don't know of such a C-lib. Still wanted to add this topic here for future reference. |
During a migration I had the (unfortunate) situation that some logjam agents where sending requests and events in UTC time and some in CET. It looks like the data is stored with the timezone information in the logjam database but the view doesn't handle it correctly.
To fix that I hat to monkey patch logjam_agent to send all requests with the application timezone. I replace this two (https:/skaes/logjam_agent/blob/master/lib/logjam_agent/rack/logger.rb#L29, https:/skaes/logjam_agent/blob/master/lib/logjam_agent/rack/logger.rb#L51)
Time.now
occurences withTime.current
which honors the application timezone.For events I manually specified the start time:
LogjamAgent.event(current_revision, started_at: Time.current.iso8601)
The text was updated successfully, but these errors were encountered: