Skip to content
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

Open
roccoblues opened this issue Oct 27, 2017 · 3 comments
Open

should logjam_agent send time in application timezone? #32

roccoblues opened this issue Oct 27, 2017 · 3 comments

Comments

@roccoblues
Copy link

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 with Time.current which honors the application timezone.

For events I manually specified the start time: LogjamAgent.event(current_revision, started_at: Time.current.iso8601)

@roccoblues
Copy link
Author

See also: skaes/logjam_core#67

@skaes
Copy link
Owner

skaes commented Oct 30, 2017

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?

@roccoblues
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants