This PR fixes #135 where runtime interpolated strings cannot be passed as arguments to the Tracer.span and Tracer.trace macros.
I have moved the guard clauses to Spandex.start_trace/2 and Spandex.start_span/2 and added guard clauses to the disabled failure case. This ensures the FunctionClauseError is raised if the macro invocation is ever reached in tests. Though, of course, this isn't as effective at preventing bad arguments as a compile time warning.
Sorry it took so long to get to this, but thanks a lot of taking the time to submit it! ❤️
I agree that this is a great improvement to the problem you identified in #135 🚀
This PR fixes #135 where runtime interpolated strings cannot be passed as arguments to the
Tracer.span
andTracer.trace
macros.I have moved the guard clauses to
Spandex.start_trace/2
andSpandex.start_span/2
and added guard clauses to the disabled failure case. This ensures the FunctionClauseError is raised if the macro invocation is ever reached in tests. Though, of course, this isn't as effective at preventing bad arguments as a compile time warning.