For php I used this guide: https://cloudpresshosting.co.uk/blog/reporting-wordpress-errors-to-sentry
For JS, I found out I can take the code of the bundle and the initialization and put in the header, using “add scripts to header and footer” plugin. https://wordpress.org/plugins/header-and-footer-scripts
It took me time to notice I can’t put the initialization within the bundle import.
Got something like this:
<script
src="https://browser.sentry-cdn.com/5.20.1/bundle.min.js"
integrity="sha384-O8HdAJg1h8RARFowXd2J/r5fIWuinSBtjhwQoPesfVILeXzGpJxvyY/77OaPPXUo"
crossorigin="anonymous">
</script>
<script>
Sentry.init({ dsn: 'https://unique@unique' });
</script>
Related Posts:
- How to eliminate weird 404 errors in wp-admin?
- Unable to get WP_DEBUG, WP_DEBUG_DISPLAY, WP_DEBUG_LOG to work
- Need Help Understanding Debug Log Errors
- Plugin debugging with errors in activation routine
- How do you debug plugins?
- How to catch/what to do with a WP Error Object
- How can I see all the actions attached to an “add_action” hook?
- An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration
- What are the best practices for updating?
- Is there any debug toolbar that shows whick hooks are called for the current page in WordPress?
- How to get Login Error messages on a custom template
- PHP Deprecated: Non-static method should not be called statically
- Error: “Cannot modify header information”
- Plugin.php: PHP Notice: Undefined offset: 0 in
- check for the current screen
- An Unexpected HTTP Error occurred during the API request
- Integrating WP as a CMS with a Bug Tracker
- How to see list of plugins
- How do you install the automattic developer plugin under localhost for mamp when there is an error, deprecated?
- echo do_shortcode is not working on theme’s template
- Plugin could not be activated because it triggered a fatal error. (No Error??)
- Unable to activate wordpress importer after installing it
- Weird problems after recovery from security breach
- Can a plugin still effect a site even after deletion?
- Accessing GET variable named ‘error’
- Why do plugins that cause ‘unexpected output’ create AJAX problems?
- Unable to install theme recommended plugins on Multisite
- Problem with wordpress version 3.8
- Call to undefined function get_userdata in user.php
- Only Homepage not loading properly
- Accidentally Broke Site (Please Help) [closed]
- Images not showing after changing wp-content folder name
- how to find and correct plugin query performance issues
- qTranslate conflicts with SEO-plugins [closed]
- CSV file generation failing
- How to redirect a URL with parameters?
- Problem using Press-this book marklet
- Python with wordpress plugin
- Nonce failing on form submission
- Uncaught TypeError: jQuery(…).flipster is not a function in wordpress
- WordPress site periodically goes down
- Deactivating all plugins and reactivating one by one, fixes conflicts. Why?
- Why do plugins deactivate by themselves?
- WordPress shows error related to allow_url_fopen
- HTTP 500 error after plugin install
- Can’t activate Plugin: unexpected T_STRING, expecting T_FUNCTION [closed]
- Plugin getting Cannot modify header information errors
- XML Sitemap Generator can’t notify google and bing
- React error #231with Custom Blocks after upgrade to WP 5.5
- There has been a critical error on your website – won’t fix no matter what
- UTF-32be error WordPress
- Elementor page builder plugin not loading up all the way? [closed]
- Getting error “Warning: mysql_query(): Can’t connect to local MySQL server through socket ‘FILEPATH/cccatalog-plugin.php on line 1656”
- Plugin showing error
- Classic, but puzzling “The uploaded file could not be moved”
- Problem after updating plugins
- Apparent errer when installing plugin
- Preview with Custom Post Type Not Working
- Undefined index: ratings_score …/wp-postratings.php on line 994
- Strange Behavior on New Theme Points to Idiocy
- Error activating certain plugins
- All new plugins generating 311 chars of unexpected output?
- WordPress fatal error from php protocol codes
- WP search box on page not finding .PDF files
- Changing wordpress/woocommerce notices default message to other languages (text)
- Critical Error after Updraft Restoration
- There has been a critical error on your website
- WordPress website working fine on localhost but not displaying front pages on webhost
- I can’t view the orders on the woocomerce dashboard with the brainblocks plugin
- Modifying server’s response to API endpoint
- ERROR message: “The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.”
- PDF Viewer Origin is Different
- Object of class WP_Error could not be converted to string in /formatting.php
- Error after installing the WordPress plugin updates
- Cannot modify header information – headers already sent during plugin activation
- WordPress website dont load CSS, JS and images
- WordPress error after installing plugin “Internal Server Error” [closed]
- What is the correct entry point for capturing coverage data
- ClassLoader.php issues after moving to a new host
- WP default file upload hook not working if used in a plugin
- Warning: Illegal offset type in /var/www/html/wp-includes/option.php on line 1924
- A more elegant way to handle notices/warnings
- A plugin is giving me “You do not have sufficient permissions to access this page.” error
- What tool are available in the wordpress API for debugging a plugin?
- Restore Category Base
- Plugin (smart archives reloaded) crashed site / no access on admin panel
- Custom Post type plugin breaking the front page shows dashboard?
- WordPress 3.5 install error
- Is there a plugin that will override the “Error establishing a database connection” message? [closed]
- Plug-in (Slickr Flickr) works on local machine, but not server
- Theme causing SSL break on chrome
- The plugin generated xxx characters of unexpected output during activation
- WordPress Customer Reviews Error: Line 239?
- WordPress Plugin: Demon Image Annotation
- WordPress Plugins Error
- How to get an error message if a form is empty (plugin: Post for site) [closed]
- WordPress error Fatal error: Uncaught TypeError: Argument 3 passed to Automattic :get_setting_for_feature() [closed]
- WordPress Throwing Deprecated Errors on its own Files
- Oxygen plugin wordpress stuck in loading sequence forever when trying to edit a page [closed]
- How to fix a Wordfence scan that doesn’t finish?