i-n-g-m-a-r

i-n-g-m-a-r

Telemetry attach warnings: Function passed as a handler with ID

Running mix test on a new Phoenix installation (1.5.9) results in many “Function passed as a handler with ID’” messages.

Does anyone know whether this is a problem and how to solve it?

Thank you.

09:13:48.858 [info]  Function passed as a handler with ID {Phoenix.Logger, [:phoenix, :channel_handled_in]} is local function.
This mean that it is either anonymous function or capture of function without module specified. That may cause performance penalty when calling such handler. For more details see note in `telemetry:attach/4` documentation.

https://hexdocs.pm/telemetry/telemetry.html#attach-4

09:13:48.871 [info]  Function passed as a handler with ID {Phoenix.Logger, [:phoenix, :channel_joined]} is local function.
This mean that it is either anonymous function or capture of function without module specified. That may cause performance penalty when calling such handler. For more details see note in `telemetry:attach/4` documentation.

https://hexdocs.pm/telemetry/telemetry.html#attach-4

09:13:48.871 [info]  Function passed as a handler with ID {Phoenix.Logger, [:phoenix, :endpoint, :start]} is local function.
This mean that it is either anonymous function or capture of function without module specified. That may cause performance penalty when calling such handler. For more details see note in `telemetry:attach/4` documentation.

https://hexdocs.pm/telemetry/telemetry.html#attach-4

09:13:48.871 [info]  Function passed as a handler with ID {Phoenix.Logger, [:phoenix, :endpoint, :stop]} is local function.
This mean that it is either anonymous function or capture of function without module specified. That may cause performance penalty when calling such handler. For more details see note in `telemetry:attach/4` documentation.

https://hexdocs.pm/telemetry/telemetry.html#attach-4

09:13:48.872 [info]  Function passed as a handler with ID {Phoenix.Logger, [:phoenix, :error_rendered]} is local function.
This mean that it is either anonymous function or capture of function without module specified. That may cause performance penalty when calling such handler. For more details see note in `telemetry:attach/4` documentation.

https://hexdocs.pm/telemetry/telemetry.html#attach-4

09:13:48.872 [info]  Function passed as a handler with ID {Phoenix.Logger, [:phoenix, :router_dispatch, :start]} is local function.
This mean that it is either anonymous function or capture of function without module specified. That may cause performance penalty when calling such handler. For more details see note in `telemetry:attach/4` documentation.

https://hexdocs.pm/telemetry/telemetry.html#attach-4

09:13:48.872 [info]  Function passed as a handler with ID {Phoenix.Logger, [:phoenix, :socket_connected]} is local function.
This mean that it is either anonymous function or capture of function without module specified. That may cause performance penalty when calling such handler. For more details see note in `telemetry:attach/4` documentation.

https://hexdocs.pm/telemetry/telemetry.html#attach-4

Marked As Solved

03juan

03juan

Yes if the project was initialised with phoenix 1.5.x and now you’ve upgraded telemetry to 1.0 and live_view to 0.17 then why not upgrade to phoenix 1.6 as per @hauleth?

Also Liked

hauleth

hauleth

Update Phoenix.

Yes, I know whether it is problem - I have implemented that warning.

It can be problem in production as calling local captures between processes (and storing them in ETS) can be quite expensive due to BEAM guarantees about local calls. Remote captures (aka one in form of &module.function/arity) are much less expensive, as these are almost equivalent to just 3-ary tuple ({module, function, arity}). Phoenix used local captures there in the past, and now it is fixed.

03juan

03juan

You need to upgrade the phx_new package from hex every time a new Phoenix version is released.

 mix archive.install hex phx_new latest

Or at least before you start a new project.

03juan

03juan

I just tried it on a fresh 1.5.9 install and don’t see those errors. Did you make any changes to the dependencies?

Out the box phx_new 1.5.9 depends on telemetry_poller v0.4 which would install v0.5.1, but the link in the errors suggests you’re using 1.0, which depends on telemetry 1.0, so you may have a version mismatch.

03juan

03juan

If they want to use 1.5.9 to follow a book or tutorials, would it be easy to change where those calls are made? Or at least they can live with the warnings. Unless the intention is a production system, in which case definitely upgrade.

Where Next?

Popular in Questions Top

openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
tduccuong
Hi, is there any work on GUI with Elixir, that is similar to Electron/Javascript? My idea is to bundle Phoenix and BEAM into a single se...
New
logicmason
Hi there, I'm working through my first release with elixir/phoenix. I've built a release with distillery and found that it crashes when I...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
kostonstyle
Hi all I want to have a unix time, from the current time plus 1 hour. DateTime.now + 1 hour How to get it in elixir? Thanks
New
Mooodi
Given a string, how can I get access to its character by index? Enum.at("my_string", 2) doesn't work. Or rather, not char, but a substr...
New

Other popular topics Top

peerreynders
Manning 2016 Halloween weekend sale via Deal of the Day Friday, October 28 - Half off all MEAPs - code WM102816LT Saturday, October 29 ...
326 29600 154
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement