You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello.
Can you provide example for Perfomance Transactions, please?
I had tried this, but it doesn't work:
'class' => \notamedia\sentry\SentryTarget::class,
'dsn' => SENTRY_DSN,
'levels' => ['error', 'warning'],
// Write the context information (the default is true):
'context' => true,
// Additional options for `Sentry\init`:
'clientOptions' => [
'traces_sample_rate' => (YII_DEBUG ? 1 : 0.1),
],
$transactionContext = new \Sentry\Tracing\TransactionContext();
$transactionContext->setName('Request Transaction');
$transactionContext->setOp('request');
// Start the transaction$transaction = \Sentry\startTransaction($transactionContext);
'on beforeRequest' => function() use ($transaction) {
// Set the current transaction as the current span so we can retrieve it later
\Sentry\SentrySdk::getCurrentHub()->setSpan($transaction);
},
'on afterRequest' => function() use ($transaction) {
// Set the current span back to the transaction since we just finished the previous span
\Sentry\SentrySdk::getCurrentHub()->setSpan($transaction);
// Finish the transaction, this submits the transaction and it's span to Sentry$transaction->finish();
}
The text was updated successfully, but these errors were encountered:
If somebody finds this issue, here is the version that worked for me. Please note, that in my case sentry/sdk was 4.0, while this library currently relies on version 3.0. So, there might me some incompatibilities that require changes.
Hello.
Can you provide example for Perfomance Transactions, please?
I had tried this, but it doesn't work:
The text was updated successfully, but these errors were encountered: