diff --git a/lib/spandex.ex b/lib/spandex.ex index c4de405..a757193 100644 --- a/lib/spandex.ex +++ b/lib/spandex.ex @@ -37,7 +37,7 @@ defmodule Spandex do strategy = opts[:strategy] if strategy.trace_active?(opts[:trace_key]) do - Logger.error("Tried to start a trace over top of another trace: #{name}.") + Logger.error("Tried to start a trace over top of another trace. name: #{inspect(name)}") {:error, :trace_running} else do_start_trace(name, opts) @@ -351,7 +351,7 @@ defmodule Spandex do strategy = opts[:strategy] if strategy.trace_active?(opts[:trace_key]) do - Logger.error("Tried to continue a trace over top of another trace: #{name}.") + Logger.error("Tried to continue a trace over top of another trace. name: #{inspect(name)}") {:error, :trace_already_present} else do_continue_trace(name, span_context, opts) @@ -393,7 +393,7 @@ defmodule Spandex do strategy = opts[:strategy] if strategy.trace_active?(opts[:trace_key]) do - Logger.error("Tried to continue a trace over top of another trace: #{name}.") + Logger.error("Tried to continue a trace over top of another trace. name: #{inspect(name)}") {:error, :trace_already_present} else do_continue_trace_from_span(name, span, opts) diff --git a/lib/tracer.ex b/lib/tracer.ex index a6242b7..478ed21 100644 --- a/lib/tracer.ex +++ b/lib/tracer.ex @@ -119,7 +119,7 @@ defmodule Spandex.Tracer do end @impl Spandex.Tracer - defmacro trace(name, opts \\ [], do: body) do + defmacro trace(name, opts \\ [], do: body) when is_binary(name) do quote do opts = unquote(opts) @@ -140,7 +140,7 @@ defmodule Spandex.Tracer do end @impl Spandex.Tracer - defmacro span(name, opts \\ [], do: body) do + defmacro span(name, opts \\ [], do: body) when is_binary(name) do quote do opts = unquote(opts) name = unquote(name)