{"action":"created","issue":{"url":"https://api.github.com/repos/honeybadger-io/honeybadger-elixir/issues/42","repository_url":"https://api.github.com/repos/honeybadger-io/honeybadger-elixir","labels_url":"https://api.github.com/repos/honeybadger-io/honeybadger-elixir/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/honeybadger-io/honeybadger-elixir/issues/42/comments","events_url":"https://api.github.com/repos/honeybadger-io/honeybadger-elixir/issues/42/events","html_url":"https://github.com/honeybadger-io/honeybadger-elixir/issues/42","id":160196811,"number":42,"title":"convert_time_unit maybe should use :native for FromUnits","user":{"login":"KronicDeth","id":298259,"avatar_url":"https://avatars.githubusercontent.com/u/298259?v=3","gravatar_id":"","url":"https://api.github.com/users/KronicDeth","html_url":"https://github.com/KronicDeth","followers_url":"https://api.github.com/users/KronicDeth/followers","following_url":"https://api.github.com/users/KronicDeth/following{/other_user}","gists_url":"https://api.github.com/users/KronicDeth/gists{/gist_id}","starred_url":"https://api.github.com/users/KronicDeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KronicDeth/subscriptions","organizations_url":"https://api.github.com/users/KronicDeth/orgs","repos_url":"https://api.github.com/users/KronicDeth/repos","events_url":"https://api.github.com/users/KronicDeth/events{/privacy}","received_events_url":"https://api.github.com/users/KronicDeth/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"nurugger07","id":353129,"avatar_url":"https://avatars.githubusercontent.com/u/353129?v=3","gravatar_id":"","url":"https://api.github.com/users/nurugger07","html_url":"https://github.com/nurugger07","followers_url":"https://api.github.com/users/nurugger07/followers","following_url":"https://api.github.com/users/nurugger07/following{/other_user}","gists_url":"https://api.github.com/users/nurugger07/gists{/gist_id}","starred_url":"https://api.github.com/users/nurugger07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nurugger07/subscriptions","organizations_url":"https://api.github.com/users/nurugger07/orgs","repos_url":"https://api.github.com/users/nurugger07/repos","events_url":"https://api.github.com/users/nurugger07/events{/privacy}","received_events_url":"https://api.github.com/users/nurugger07/received_events","type":"User","site_admin":false},"assignees":[{"login":"nurugger07","id":353129,"avatar_url":"https://avatars.githubusercontent.com/u/353129?v=3","gravatar_id":"","url":"https://api.github.com/users/nurugger07","html_url":"https://github.com/nurugger07","followers_url":"https://api.github.com/users/nurugger07/followers","following_url":"https://api.github.com/users/nurugger07/following{/other_user}","gists_url":"https://api.github.com/users/nurugger07/gists{/gist_id}","starred_url":"https://api.github.com/users/nurugger07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nurugger07/subscriptions","organizations_url":"https://api.github.com/users/nurugger07/orgs","repos_url":"https://api.github.com/users/nurugger07/repos","events_url":"https://api.github.com/users/nurugger07/events{/privacy}","received_events_url":"https://api.github.com/users/nurugger07/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-06-14T14:32:20Z","updated_at":"2016-06-30T02:22:57Z","closed_at":"2016-06-30T02:22:57Z","body":"There is an inconsistency with [`Plug.Logger`](https://github.com/elixir-lang/plug/blob/22227a5f1627b2bb0410eb4a0cfdc40f1b037c18/lib/plug/logger.ex#L47-L48):   It uses `:erlang.monotonic_time` to get the start and end times and when converting from the `:erlang.monotonic_time` default units to microseconds it does:\r\n\r\n```\r\n(stop - start) |> :erlang.convert_time_unit(:native, :micro_seconds)\r\n```\r\n\r\n[`HoneyBadger.Plug`](https://github.com/honeybadger-io/honeybadger-elixir/blob/master/lib/honeybadger/plug.ex#L12-L17) uses `:erlang.monotonic_time` to get the start and end times (the same as `Plug.Logger`), but when converting from the `:erlang.monotonic_time` default units it does:\r\n\r\n```\r\nresponse_time = :erlang.convert_time_unit(after_response - before_response, :nano_seconds, :milli_seconds)\r\n```\r\n\r\nSo, `Plug.Logger` uses `:native` for `FromUnits` while `HoneyBadger.Plug` uses `:nano_seconds`.  They are probably equivalent on OSX and Linux, but I think it is probably safer for `HoneyBadger.Plug` to use `:native` like `Plug.Logger` in case it is used on a BEAM VM where `:nano_seconds` isn't the same as `:native`"},"comment":{"url":"https://api.github.com/repos/honeybadger-io/honeybadger-elixir/issues/comments/229542825","html_url":"https://github.com/honeybadger-io/honeybadger-elixir/issues/42#issuecomment-229542825","issue_url":"https://api.github.com/repos/honeybadger-io/honeybadger-elixir/issues/42","id":229542825,"user":{"login":"nurugger07","id":353129,"avatar_url":"https://avatars.githubusercontent.com/u/353129?v=3","gravatar_id":"","url":"https://api.github.com/users/nurugger07","html_url":"https://github.com/nurugger07","followers_url":"https://api.github.com/users/nurugger07/followers","following_url":"https://api.github.com/users/nurugger07/following{/other_user}","gists_url":"https://api.github.com/users/nurugger07/gists{/gist_id}","starred_url":"https://api.github.com/users/nurugger07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nurugger07/subscriptions","organizations_url":"https://api.github.com/users/nurugger07/orgs","repos_url":"https://api.github.com/users/nurugger07/repos","events_url":"https://api.github.com/users/nurugger07/events{/privacy}","received_events_url":"https://api.github.com/users/nurugger07/received_events","type":"User","site_admin":false},"created_at":"2016-06-30T02:22:57Z","updated_at":"2016-06-30T02:22:57Z","body":"Thanks for the heads up @KronicDeth! Branch is merged :)"}}
{"actor":{"display_login":"nurugger07"}}