Closed jonathanleang closed 7 years ago
This is a dupe of #34.
The first half is fixed in #36, and will be released soon in the next version of the agent.
The second half is related to how Elixir names macros when included via use
. It doesn't attempt to import them into your environment.
So you have 2 options in that case:
Use the complete module name:
use ScoutApm.Tracing
def interesting() do
ScoutApm.Tracing.transaction(:background, "Work") do
# ...
end
end
Import it to avoid retyping the namespace:
use ScoutApm.Tracing
import ScoutApm.Tracing
def interesting() do
transaction(:background, "Work") do
# ...
end
end
Technically, you can even get away without the use
call in the second example. That's only required if you're using the @transaction
module-attribute approach to tracing. But leaving it also doesn't hurt.
Released in agent version 0.3.2
when I have 2 @transaction in my channel controller, I got compile error.... one is fine, anything more is error.
also tried without @transaction, still doesn't work.
have derek have reproduced this bug from slack help