justbetter / magento2-sentry

Magento 2 module to log to Sentry
MIT License
165 stars 70 forks source link

Performance tracking #106

Open barryvdh opened 2 years ago

barryvdh commented 2 years ago

This adds initial performance tracking by sending (server side) transactions. Could be used to add long-running queries or other events perhaps. Needs to set a sample rate + enable it in the backend. See https://github.com/justbetter/magento2-sentry/issues/60

(Not very much experience with this, but it does seem to record transactions).

barryvdh commented 2 years ago

Tweaked it a bit, it now also adds the SQL queries from the Profliler image

peterjaap commented 1 year ago

@barryvdh did you do any testing on a production system of this?

barryvdh commented 1 year ago

Not that much, database logging didnt really work this way but I was trying a different way before I was distracted by New Relic. It did seem to log the requests itself though, just not much additional data.

peterjaap commented 1 year ago

@barryvdh I have to say I'm more interested in the CWV tracking (https://docs.sentry.io/product/performance/web-vitals/) than in database logging / PHP request logging. We use Blackfire for that mainly.

ahmadalfy commented 1 year ago

This is really exciting, can we get that merged?

MagicLegend commented 1 year ago

Hey @barryvdh / @indykoning , what is still missing from this PR? I would be down to do the last mile to get this PR across the finish line. I would love to have performance tracking integrated :)

indykoning commented 1 year ago

For me the main thing missing is that check wether performance tracking is enabled and preventing any performance tracking code from being executed if it is enabled.

So just the review left above, https://github.com/justbetter/magento2-sentry/pull/106#discussion_r1091702120 is not the only place this check should be though.

norgeindian commented 1 year ago

@peterjaap , did you find a way to monitor Core Web Vitals with the module?

Seroliser commented 1 year ago

Is there any status here? Is it possible to get this merged into master? We're in need of profiling on Magento projects. Would be highly appreciated!

peterjaap commented 1 year ago

@Seroliser have you tested this PR?

barryvdh commented 1 year ago

To be honest, I'm not sure if this was ready or not. I think it was somewhat working, but only on dev setups. So not sure how valuable that is. I would have to test some more.

I agree that Web Vitals could be more useful, but I was hoping to catch some bad behaviour with production data (eg. queries in loops etc).

norgeindian commented 1 year ago

After we included the current setup, we were actually able to see results for Core Web Vitals without further configuration. So it seems to be included already.

JKetelaar commented 11 months ago

Also been using this for a few months now and it works great!

metalc0der commented 6 months ago

I see this PR is still in draft. Did this feature ever get merged into master? I want to start using the package but I need performance monitoring.

amenk commented 5 months ago

@norgeindian as for CoreWebVitals, this might also be interesting for you :-) #137

norgeindian commented 5 months ago

@amenk , thanks for the info. Looks good. But why do we already see results in the CoreWebVitals section in Sentry, if that feature was turned off all the time? Or does it even improve these statistics?

amenk commented 5 months ago

@norgeindian my PR is about the new INP metric (and the JS library update)

norgeindian commented 5 months ago

@amenk , ah sorry, now I get it. Awesome, really cool. Thanks for that.