@transaction(type: "web", name: "new_msg")
def handle_in("new_msg", %{"body" => body}, socket) do
broadcast! socket, "new_msg", %{body: body}
{:noreply, socket}
end
@transaction(type: "web", name: "new_msg2")
def handle_in("new_msg2", %{"body" => body}, socket) do
broadcast! socket, "new_msg", %{body: body}
{:noreply, socket}
end
Results in a compile error:
== Compilation error on file lib/camp_waitlist/web/channels/HtmlChannel.ex ==
** (ArgumentError) cannot make function handle_in/3 overridable because it was not defined
(elixir) lib/module.ex:804: anonymous fn/2 in Module.make_overridable/2
(stdlib) lists.erl:1338: :lists.foreach/2
lib/scout_apm/tracing/annotations.ex:79: anonymous fn/2 in ScoutApm.Tracing.Annotations.instrument_transactions/1
(elixir) lib/enum.ex:1229: Enum."-map/2-lists^map/1-0-"/2
(elixir) lib/enum.ex:1229: Enum."-map/2-lists^map/1-0-"/2
expanding macro: ScoutApm.Tracing.Annotations.before_compile/1
lib/camp_waitlist/web/channels/HtmlChannel.ex:1: CampWaitlist.Web.HtmlChannel (module)
(elixir) lib/kernel/parallel_compiler.ex:117: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/1
For example:
Results in a compile error: