Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phoenix 1.4 Phoenix.Socket struct change #11

Open
akoutmos opened this issue Jan 6, 2019 · 5 comments
Open

Phoenix 1.4 Phoenix.Socket struct change #11

akoutmos opened this issue Jan 6, 2019 · 5 comments

Comments

@akoutmos
Copy link

akoutmos commented Jan 6, 2019

It looks like in Phoenix 1.4 the Phoenix.Socket struct no longer has the :transport_name field which in turns yields the following error:

[error] Instrumenter SampleApp.PhoenixInstrumenter.phoenix_channel_join/3 failed.
** (KeyError) key :transport_name not found in: %Phoenix.Socket{assigns: %{}, channel: Phoenix.LiveReloader.Channel, channel_pid: nil, endpoint: SampleAppWeb.Endpoint, handler:
Phoenix.LiveReloader.Socket, id: nil, join_ref: "1", joined: false, private: %{log_handle_in: :debug, log_join: :info}, pubsub_server: SampleApp.PubSub, ref: nil, serializer: Phoenix.Socket.V2.JSONSerializer, topic: "phoenix:live_reload", transport: :websocket, transport_pid: #PID<0.695.0>}

Any thoughts on getting around this with Phoenix 1.4?

Thanks!

@deadtrickster
Copy link
Owner

Possible temporary solution would be overriding default list of labels and using :transport, not :transport_name here.

@akoutmos
Copy link
Author

akoutmos commented Jan 7, 2019

For if anyone else comes across this issue, I changed my config as follows:

config :prometheus, SampleApp.PhoenixInstrumenter,
  controller_call_labels: [:controller, :action],
  channel_join_labels: [:channel, :topic, :transport]

@jalberto
Copy link

jalberto commented Feb 7, 2019

Any plan to solve this?

@paveltyk
Copy link
Contributor

This should work with phoenix 1.4: #13

@smaximov
Copy link
Contributor

Can confirm, it works for me with v1.3.0 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants