igorkasyanchuk / rails_performance

Monitor performance of you Rails applications (self-hosted and free)
https://www.railsjazz.com/
MIT License
950 stars 53 forks source link

Add traces to custom_events #77

Open joeesteves opened 4 months ago

joeesteves commented 4 months ago

Hey @igorkasyanchuk I've tried this Gem and to be honest I find it really useful so far. I'm using DD on prod but for developing I feel this tool is a great tool. So first thanks for the 💎

I was wondering if it is to complex to add traces to custom event

RailsPerformance.measure("some label", "some namespace") do
   # your code
end

So you can wrap a piece of code on the block and check queries happening there. I can make a PR for this feature, but first want you POV on the feasibility off this.

Thanks

igorkasyanchuk commented 4 months ago

https://github.com/igorkasyanchuk/rails_performance/blob/35a0859b76a23981e890640dce838ff3e18ae78a/app/views/rails_performance/rails_performance/custom.html.erb#L31

you talking about this?

joeesteves commented 4 months ago

Yes, that's the one I'm talking about.

igorkasyanchuk commented 4 months ago

try to do it