diff --git a/lib/phoenix/socket.ex b/lib/phoenix/socket.ex index 8a8a3d69ac..448d16117f 100644 --- a/lib/phoenix/socket.ex +++ b/lib/phoenix/socket.ex @@ -676,7 +676,8 @@ defmodule Phoenix.Socket do state = put_channel(state, pid, topic, join_ref) num_channels = map_size(state.channels) - :telemetry.execute([:phoenix, :socket, :joined_channels], %{total: num_channels}) + metadata = %{assigns: socket.assigns} + :telemetry.execute([:phoenix, :socket, :joined_channels], %{total: num_channels}, metadata) {:reply, :ok, encode_reply(socket, reply), {state, socket}} {:error, reply} ->