mirror of
https://github.com/ash-project/ash.git
synced 2024-09-19 21:13:10 +12:00
fix: don't list telemetry handlers if app is compiling
This commit is contained in:
parent
dbe825b504
commit
04382cbc53
1 changed files with 8 additions and 6 deletions
|
@ -85,17 +85,19 @@ defmodule Ash.Tracer do
|
|||
|
||||
metadata = unquote(metadata)
|
||||
|
||||
compiling? = Code.can_await_module_compilation?()
|
||||
|
||||
metadata =
|
||||
unless compiling? do
|
||||
case :telemetry.list_handlers(telemetry_name) do
|
||||
[] -> %{}
|
||||
_ when is_function(metadata) -> apply(metadata, [])
|
||||
_ -> metadata
|
||||
end
|
||||
end
|
||||
|
||||
start = System.monotonic_time()
|
||||
|
||||
compiling? = Code.can_await_module_compilation?()
|
||||
|
||||
unless compiling? do
|
||||
:telemetry.execute(
|
||||
telemetry_name ++ [:start],
|
||||
|
|
Loading…
Reference in a new issue