Skip to content

Instantly share code, notes, and snippets.

Created February 14, 2018 09:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/120630325115b24376dc0af0580f0b6b to your computer and use it in GitHub Desktop.
Save anonymous/120630325115b24376dc0af0580f0b6b to your computer and use it in GitHub Desktop.
repo.ex

defmodule MyApp.Repo do
use Ecto.Repo, otp_app: :myapp

def log(entry) do query_exec_time = (entry.query_time + entry.queue_time || 0) / 1000 query_queue_time (entry.queue_time || 0) / 1000

send_data_to_metrics_collecting_gen_server

super entry

end end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment