Skip to content

Commit

Permalink
Merge pull request #5 from Whatnot-Inc/report-channels-joined-on-socket
Browse files Browse the repository at this point in the history
Pass socket assigns as metadata
  • Loading branch information
studzien authored Feb 8, 2024
2 parents 85a6a25 + f98acf3 commit 218810a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/phoenix/socket.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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} ->
Expand Down

0 comments on commit 218810a

Please sign in to comment.