AppSignal v0.8.0 Appsignal.Phoenix.Channel

Instrumentation for channel events

Currently only incoming channel requests can be instrumented, e.g. in the handle_in function of your application. Add the channel_action function there, passing in a name for the channel action, the socket and the actual code that you are executing in the channel handler:

defmodule SomeApp.MyChannel do

  use Appsignal.Phoenix.Channel

  def handle_in("ping" = action, _payload, socket) do
    channel_action(action, socket, fn ->
      # do some heave processing here...
      reply = perform_work()
      {:reply, {:ok, reply}, socket}
    end)
  end

end

Channel events will be displayed under the “Background jobs” tab, showing the channel module and the action argument that you entered.

Summary

Functions

Given the Appsignal.Transaction and a Phoenix.Socket, add the socket metadata to the transaction

Functions

set_metadata(transaction, socket)

Given the Appsignal.Transaction and a Phoenix.Socket, add the socket metadata to the transaction.