admin管理员组文章数量:1387396
I am integrating Sentry.io into my multisite setup. I have 5 themes and a number of plugins across the network too.
Sentry needs to be initialised as early as possible, I want it to be loaded before the plugins so it can track issues with the plugins too. Where is the best place to insert the following:
To capture all errors, even the one during the startup of your application, you should initialize the Sentry PHP SDK as soon as possible.
Sentry\init(['dsn' => 'https://[email protected]/123456789' ]);
As mentioned, I have multiple themes, so I don't suspect putting this line in each theme is correct.
I am integrating Sentry.io into my multisite setup. I have 5 themes and a number of plugins across the network too.
Sentry needs to be initialised as early as possible, I want it to be loaded before the plugins so it can track issues with the plugins too. Where is the best place to insert the following:
To capture all errors, even the one during the startup of your application, you should initialize the Sentry PHP SDK as soon as possible.
Sentry\init(['dsn' => 'https://[email protected]/123456789' ]);
As mentioned, I have multiple themes, so I don't suspect putting this line in each theme is correct.
Share Improve this question asked Apr 29, 2020 at 9:21 wharfdalewharfdale 3484 silver badges17 bronze badges 1- Could you include it into wp-config.php? Earliest way to load it in a file that won’t be affected by updates. – Jacob Peattie Commented Apr 29, 2020 at 10:10
1 Answer
Reset to default 1Maybe as a must-use plugin?
From docs,
- Always-on, no need to enable via admin and users cannot disable by accident.
- Can be enabled simply by uploading file to the mu-plugins directory, without having to log-in.
- Loaded by PHP, in alphabetical order, before normal plugins, meaning API hooks added in an mu-plugin apply to all other plugins even if they run hooked-functions in the global namespace.
本文标签: debugBest location for a debugging script
版权声明:本文标题:debug - Best location for a debugging script 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744520702a2610434.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论