Skip to content

Commit

Permalink
feat: add sentry transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
daflyinbed committed Apr 27, 2024
1 parent b8e3aac commit 429f7f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion includes/MediaWiki.php
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,10 @@ private function performAction( Article $article, Title $requestTitle ) {
* Run the current MediaWiki instance; index.php just calls this
*/
public function run() {
$transactionContext = \Sentry\Tracing\TransactionContext::make()->setName('run');

// Start the transaction
$transaction = \Sentry\startTransaction($transactionContext);
try {
$this->main();
} catch ( Exception $e ) {
Expand All @@ -583,7 +587,7 @@ public function run() {
// Type errors and such: at least handle it now and clean up the LBFactory state
MWExceptionHandler::handleException( $e, MWExceptionHandler::CAUGHT_BY_ENTRYPOINT );
}

$transaction->finish();
$this->doPostOutputShutdown();
}

Expand Down

0 comments on commit 429f7f3

Please sign in to comment.