Skip to content

Commit

Permalink
add support for repo names like MyApp.Something.Repo
Browse files Browse the repository at this point in the history
  • Loading branch information
wiserfirst committed May 16, 2019
1 parent be5cf07 commit 3a37de1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/spandex_ecto/telemetry_adapter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ defmodule SpandexEcto.TelemetryAdapter do
EctoLogger.trace(log_entry, "#{repo_name}_database")
end

def handle_event(event_name, measurements, log_entry, config) when is_list(event_name) do
event_name
|> tl()
|> handle_event(measurements, log_entry, config)
end

defp wrap_result(result) when is_atom(result), do: {result, "n/a"}
defp wrap_result(result), do: result
end

0 comments on commit 3a37de1

Please sign in to comment.