forked from wikimedia/mediawiki
-
Notifications
You must be signed in to change notification settings - Fork 0
Patches
夕舞八弦 edited this page Apr 27, 2024
·
1 revision
- Sentry
https://github.com/MooncellWiki/mw/commit/429f7f3c8e476202ac44e18f71a33dcfa66361f2
Inspired by https://gerrit.wikimedia.org/r/c/mediawiki/core/+/958470
diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php
index d88c4df3853..198b4ccd898 100644
--- a/includes/MediaWiki.php
+++ b/includes/MediaWiki.php
@@ -558,6 +558,10 @@ class MediaWiki {
* 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 ) {
@@ -583,7 +587,7 @@ class MediaWiki {
// 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();
}