The is_binary guards on trace/2 and span/2 macros cause problems when the span name is computed at runtime.
If the span name is a variable or an interpolated string like "name.#{key}", then the guard fails, as the macro receives an AST structure instead of a string. This PR removes the guard.
To get the similar effect of protecting against incorrect usage, the guard could be added to Spandex.start_trace/2.
The
is_binary
guards ontrace/2
andspan/2
macros cause problems when the span name is computed at runtime. If the span name is a variable or an interpolated string like "name.#{key}", then the guard fails, as the macro receives an AST structure instead of a string. This PR removes the guard.To get the similar effect of protecting against incorrect usage, the guard could be added to
Spandex.start_trace/2
.