Cosmetic change to avoid dangling suffix of ':' if source is nil (#23)
As it stands, when source is nil (which, for example, can happen if there is a call to `Repo.transaction`), the name of the span ends in an odd ':'. This removes that ':'. Co-authored-by: Bryan Naegele <bryannaegele@users.noreply.github.com>
This commit is contained in:
parent
2f2b31c1ce
commit
d92d8ef7c8
|
@ -57,7 +57,7 @@ defmodule OpentelemetryEcto do
|
|||
case Keyword.fetch(config, :span_prefix) do
|
||||
{:ok, prefix} -> prefix
|
||||
:error -> Enum.join(event, ".")
|
||||
end <> ":#{source}"
|
||||
end <> if source != nil, do: ":#{source}", else: ""
|
||||
|
||||
time_unit = Keyword.get(config, :time_unit, :microsecond)
|
||||
|
||||
|
|
Loading…
Reference in New Issue