Report back all ActiveRecord init statements in the DB span
Using 2.11.0 of the elastic-apm gem
Comparing the elastic-apm capture to another package, it looks like it strips the ActiveRecord session initialization parameters from the span. For example, a different APM solution shows the active record init parameters along with the query but these seem to be missing from the span in ES.
Why this is helpful is because in this specific example below, the ActiveRecord DB commands run whenever AR has to provision a new connection from the database pool. We have found these can be significantly slow (and show as such in other examples) but when viewing these in the ES APM, the trace only shows the actual SELECT, missing some other important data.
Active Record also obtains advisory locks in the session which can take a while to obtain where there is lock contention so it's super helpful to be able to see the ActiveRecord items in the trace.
Sample span/trace from a different APM solution.

Hi @dnorth98 Thanks for the suggestion. We’ll look into the feasibility of adding this and have an update soon. Thanks!