From my notes in Slack.
In a Phoenix controller, doing this breaks the reporting for that action:
Appsignal.instrument("event.group", fn span ->
render(conn, :home)
end)
Order of events:
- phoenix_endpoint_start
- phoenix_router_dispatch_start
- Appsignal.instrument - start
- phoenix_endpoint_stop:
- This is called here because of
render inside Appsignal.instrument
- This event closes the span from
Appsignal.instrument as it's the current span
- Appsignal.instrument - stop:
- This moment closes the same span again as the last step, not the current span (which would also be wrong)
- phoenix_router_dispatch_stop:
- This closes the span from
phoenix_router_dispatch_start, instead of what it should be closing: phoenix_endpoint_start
The Phoenix events are from our Phoenix package.
Fix it somehow in our Phoenix event handler.
From my notes in Slack.
In a Phoenix controller, doing this breaks the reporting for that action:
Fix it somehow in our Phoenix event handler.