Open webtekindo opened 4 years ago
That is not in the planning yet, but is is a great feature request! 😄
I have put it on the planning, in the meantime PRs are always welcome 🙂
@webtekindo what should we add for this? As far as I can see, you just have to add 'traces_sample_rate' => 1.0
to your env.php file?
@webtekindo what should we add for this? As far as I can see, you just have to add
'traces_sample_rate' => 1.0
to your env.php file?
@peterjaap does the plugin pass the traces_sample_rate
parameter onto Sentry SDK?
@salmino you're right. It does not.
But with https://github.com/justbetter/magento2-sentry/pull/90, you can easily enable the performance monitoring to test it. I'm running a test now, if it's successful, I'll create a PR to add it to this extension.
I've created an observer that does this;
$observer->getEvent()->getConfig()->setTracesSampleRate(1.0);
Or you could use the sampler;
$observer->getEvent()->getConfig()->setTracesSampler(function (\Sentry\Tracing\SamplingContext $context): float {
return 1.0;
});
If you run it in production and especially if you have a high sample rate, please use Relay.
I guess this doesn't do anything since we should probably find a way to create these "Transactions" they're speaking of. Now, this extension only fires when an actual exception is being thrown.
Ah, here's some more info on how to create those transactions; https://docs.sentry.io/platforms/php/performance/instrumentation/custom-instrumentation/
Maybe we could get some inspiration from https://github.com/yireo/Yireo_NewRelic2
Proof of concept: https://github.com/justbetter/magento2-sentry/pull/106
Is performance monitoring working?
Is there any plan to be able to use https://docs.sentry.io/product/performance/getting-started/ with this extension? Thank you.