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 to catch/what to do with a WP Error Object
- How can I see all the actions attached to an “add_action” hook?
- What are the best practices for updating?
- Is there a plugin that will override the “Error establishing a database connection” message? [closed]
- Loading external page template and enqueue script from plugin causes 403 forbidden error
- Is there any debug toolbar that shows whick hooks are called for the current page in WordPress?
- $wpdb->get_results leaking memory
- PHP Deprecated: Non-static method should not be called statically
- How to remove/hide action links cluttering under specific plugins’ names
- Plugins error (Use roles and capabilities instead) on latest version, multisite
- WordPress error – PHP Fatal error: Uncaught Error: Call to undefined function register_block_type_from_metadata()
- How to use WP-FirePHP extension?
- “Are you sure you want to do this?” when deactivating all plugins in WordPress 4.3.1 [closed]
- How should I handle errors within a plugin?
- An Unexpected HTTP Error occurred during the API request
- Integrating WP as a CMS with a Bug Tracker
- How to see list of plugins
- Enable/Disable WP options programmatically
- Seaweed Plugin not working
- Plugin could not be activated because it triggered a fatal error. (No Error??)
- All plugins deactivated due to error
- Unable to activate wordpress importer after installing it
- Weird problems after recovery from security breach
- Error in the wp-config.php file: PHP Fatal error: Uncaught Error: Unknown named parameter (PHP 8.0)
- Can a plugin still effect a site even after deletion?
- Error handling a plugin with exceptions
- Post-terms-order PHP errors after update
- Call to undefined function get_userdata in user.php
- Only Homepage not loading properly
- One of my plugins broke when I tried to update it, how do I safely uninstall it?
- Images not showing after changing wp-content folder name
- WooCommerce Checkout Error [closed]
- Plugin: Google Analytics for Dashboard error – Timestamp is too far from current time
- How to redirect a URL with parameters?
- Problem using Press-this book marklet
- Nonce failing on form submission
- Problem In Advance search Plugin [closed]
- Deactivating all plugins and reactivating one by one, fixes conflicts. Why?
- Get errors from WP_Error to different variables
- help with my wordpress website
- HTTP 500 error after plugin install
- Can’t activate Plugin: unexpected T_STRING, expecting T_FUNCTION [closed]
- Plugin getting Cannot modify header information errors
- WP-nivo-slider Producing Error “Cannot modify header information – headers already sent by …”
- XML Sitemap Generator can’t notify google and bing
- After updating the WordPress getting a syntax error in the console
- There has been a critical error on your website – won’t fix no matter what
- Plugin showing error
- Classic, but puzzling “The uploaded file could not be moved”
- Plugin upgrade failing during unzip
- Problem after updating plugins
- Apparent errer when installing plugin
- Preview with Custom Post Type Not Working
- How to get Facebook comment plugin in blog? [closed]
- Undefined index: ratings_score …/wp-postratings.php on line 994
- Strange Behavior on New Theme Points to Idiocy
- 404 errors when updating options in admin dashboard
- Error activating certain plugins
- All new plugins generating 311 chars of unexpected output?
- Error when adding extensions to wordpress version 5.9 with a DIVI install
- Replace old theme that understand old css (vcex_icon_box css_animation)
- WordPress fatal error from php protocol codes
- There has been a critical error on this website
- WP search box on page not finding .PDF files
- Access “wp site health info” data from plugin
- Changing wordpress/woocommerce notices default message to other languages (text)
- How to Fix WordPress multisite woocommerce 403 file error
- 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
- Modifying server’s response to API endpoint
- Woocommerce functions in custom class, avoid errors
- ERROR message: “The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.”
- Object of class WP_Error could not be converted to string in /formatting.php
- Error after installing the WordPress plugin updates
- White blank screen while adding or editing pages in wordpress
- Cannot modify header information – headers already sent during plugin activation
- WordPress error after installing plugin “Internal Server Error” [closed]
- WP default file upload hook not working if used in a plugin
- 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?
- Plugin won’t activate, fatal error (widget class not found)
- 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 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]
- How can I resolve an error on WordPress after PHP update
- AI Code For OpenAI
- How can I disable a plugin in Health Check mode if there’s a critical error?