I’m trying to make telemetry work for the last couple of days, but without any luck. My setup runs in a docker container on a remote machine. The issue started when I wanted to receive
[:phoenix, :router_dispatch, :stop] telemetry event. I attach to events with
:telemetry.attach_many, all the usual stuff. I see every event, besides
[:phoenix, :router_dispatch, :stop]. I tried a lot of things, and got the project to a state where I restart the container, make 1 request and I see my event. But for all later requests it doesn’t come anymore.
Then to check the theory if maybe it’s something wrong with my project, I created a new clean project and ran it in a) remote docker 2) docker on mac 3) mac without docker. On docker on mac and pure mac it works flawlessly, every event is received.
On remote docker - nope. I receive everything but
[:phoenix, :router_dispatch, :stop]. @chrismccord in Slack recommended to add some debugging statements to Phoenix Router before the telemetry events get sent. I did that and now I am even more puzzled.
As you see from the log, “BEFORE ETS” gets logged, but not the content from :ets, and nothing after that. If I comment out the
:ets.tab2list line, then “BEFORE STOP” gets logged.
Is it something with
:ets? What is going on? And why is it happening only in remote docker?