spandex-project/spandex

Compilation error when dynamically defined span names

gerbal opened this issue · 0 comments

When attempting to update to 3.1.0 I encountered a compilation error with dynamically defined span names. i.e.

def some_function(some, thing) do
    Tracer.span("#{some}.#{thing}") do
      :noop
    end
end

produces a function clause error

== Compilation error in file lib/api.ex ==
** (FunctionClauseError) no function clause matching in MyApp.Tracer.span/3    
    expanding macro: MyApp.Tracer.span/3
    lib/api.ex: MyApp.Api.some_function/2
    (elixir 1.12.3) lib/kernel/parallel_compiler.ex:319: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/7