Skip to content

Commit

Permalink
Merge pull request #37 from MindscapeHQ/js/documentation
Browse files Browse the repository at this point in the history
Documentation for new changes
  • Loading branch information
redJ4y authored Feb 14, 2023
2 parents 062e459 + cd7c930 commit 28cbfcb
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 132 deletions.
78 changes: 31 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,89 +1,73 @@
Raygun4WP
==========

[Raygun](http://raygun.com) provider plugin for Wordpress
**[Raygun](http://raygun.com) for WordPress**

Wordpress plugin providing the easy integration of Raygun to Wordpress websites. [Crash Reporting](https://raygun.com/products/crash-reporting) allows developers to easily track errors, exceptions and crashes automatically while [Real User Monitoring](https://raygun.com/products/real-user-monitoring) allows you to identify issues, measure trends in application performance, and improve your customers’ experience.
The WordPress plugin providing an easy integration of Raygun into WordPress websites. [Crash Reporting](https://raygun.com/platform/crash-reporting) allows developers to easily track errors, exceptions and crashes automatically, while [Real User Monitoring](https://raygun.com/platform/real-user-monitoring) allows developers to identify issues, measure trends in application performance, and improve customer experiences.

This provider uses the lower-level [Raygun4PHP](https://github.com/MindscapeHQ/raygun4php) provider for server-side crash reporting and [Raygun4JS](https://github.com/MindscapeHQ/raygun4js) for both client-side crash reporting and real user monitoring.

**Multisite support**: This plugin supports Multisite installations, but a specific installation procedure should be followed. Read the instructions below for more information.
**Multisite support**: *This plugin is not guaranteed to work on multisite installations with certain environments.* A specific installation procedure should be followed. More information can be found [here](https://wordpress.org/plugins/raygun4wp/#multisite%20support).

## Installation

Ensure that your server is running
- PHP 5.3.3 or newer
- **curl** library enabled
Ensure that your server is running at least WordPress 5.3 and PHP 7.4.

*Raygun4WP version 1.9.3 is recommended for use with older PHP versions >= 5.3.3.*

### From Wordpress Plugin Directory

Add it from the official *wordpress.org* repository using your admin panel - the plugin is available from [wordpress.org/plugins/raygun4wp](http://wordpress.org/plugins/raygun4wp).

### Manually with Git

Clone this repository into your Wordpress installation's `/plugins` folder - e.g. `/wordpress/wp-content/plugins`. Use the --recursive flag to also pull down the [Raygun4PHP](https://github.com/MindscapeHQ/raygun4php) and [Raygun4JS](https://github.com/MindscapeHQ/raygun4js) dependencies:
Clone this repository into your WordPress installation's `/plugins` folder - e.g. `/wordpress/wp-content/plugins`.

```
git clone --recursive https://github.com/MindscapeHQ/raygun4wordpress.git
git clone https://github.com/MindscapeHQ/raygun4wordpress.git
```

### From Wordpress Plugin Directory

Add it from the official repository using your admin panel - the plugin is available on [wordpress.org/plugins/raygun4wp/](http://wordpress.org/plugins/raygun4wp/).

## Usage

1. Navigate to your Wordpress admin panel, click on Plugins, and then **Activate Raygun4WP**
2. Go to the Raygun4WP settings panel either by the sidebar or admin notification
3. Copy your application's API key from the [Raygun dashboard](https://app.raygun.com/dashboard/) and place it in the API key field
4. Enable `Error Tracking` (both server-side and client-side), `Real User Monitoring` and any other options
5. Save your changes
6. Done!

## Real User Monitoring
1. Navigate to your WordPress admin panel, click on Plugins, and then **Activate Raygun**.
2. Visit the Raygun plugin **About** page.
3. Follow the steps under *Get Started Today*.

As of 1.8 of Raygun4WP plugin you can enable [real user monitoring](https://raygun.com/products/real-user-monitoring).
## Crash Reporting

This feature can be enabled via the Settings page under **Real User Monitoring**.
[Raygun Crash Reporting](https://raygun.com/platform/crash-reporting) silently monitors your software and notifies you when users encounter errors. Crash Reporting also provides deep diagnostic information about the root cause of the error or crash, meaning your team won't be losing valuable time digging through log files.

User information will be sent along if you have the Customers feature enabled.
Using this plugin, you can enable crash reporting to track errors and exceptions generated by your WordPress site.

## Client-side error tracking

Since 1.4 of the Raygun4WP plugin you can enable client-side error monitoring.
## Real User Monitoring

This feature automatically tracks JavaScript errors that occur in your user's browsers when they are loaded.
Ensure your website delivers a flawless user experience using [Raygun Real User Monitoring](https://raygun.com/platform/real-user-monitoring). Monitor the performance of every user session so you can make improvements. Measure how geographic location affects your user experience by viewing detailed breakdowns. Increase user retention by discovering the problematic pages your users get stuck on.

This setting can be activated via the Settings page.
Using this plugin, you can enable real user monitoring to track individual user sessions, asset load times and more about your WordPress site.

## Customers

This feature can be enabled via the Settings page.

Enabling this feature will send through the currently logged in user's email address, first name and last name with each message to Raygun. This applies to both Crash Reporting and RUM payloads.

If a user is not logged in, no user data will be sent and a random ID will be assigned to the user.
Customers are why we create software. See them all, what they do, and how they're impacted by errors, crashes, and performance issues when using your software applications. Raygun Customers gives you complete clarity on who is using your application, alongside any problems they encountered that negatively impacted their end-user experience. Understand what actions led to an issue occurring and whether the overall experience was good or bad for individual users. Customers is included in all Raygun plans and can be set up quickly by enabling it in your plugin settings.

The user's information will then be available to you when viewing crash reports and user sessions. If the user has an associated Gravatar with that address, you will see their picture.
When enabled, the currently logged in user's email address, first name and last name will be transmitted with each error or session. This will be visible in the Raygun dashboard. If this feature is not enabled, a random ID will be assigned to each user.

If this feature is not enabled, a random ID will be assigned to each user.
## Tagging Errors

## Tagging errors
As of 1.8.0, both client-side and server-side errors can be tagged. Tags are custom text transmitted with errors that allow for easy identification. For example, a developer might want to tag JavaScript errors with *client-side* and PHP errors with *server-side*.

Since 1.8 both client-side and server-side errors can be tagged. Tags are custom test allowing you to easily identify errors.
## Asynchronous Sending

JavaScript and PHP errors can be tagged independently through a comma-delimited list in the field on the settings page.
As of 2.0.0, asynchronous sending is avaliable on both Unix and Windows based systems. **Enabling async sending should yeild a significant performance increase.**

For example: `Error, JavaScript` would add two tags. The first being `Error` second one being `JavaScript`
## Logging Unsent Errors

## Ignored domains
As of 2.0.0, errors that fail to send to Raygun will be logged to the standard WordPress log file (`WP_CONTENT_DIR`**/debug.log**).

You can enter a comma-delimited list in the field on the settings page to prevent certain domains from sending errors and from being tracked with real user monitoring.

## Async sending

Introduced in 1.1.3, this provider will now send asynchronously on *nix servers (async sockets) resulting in a massive speedup - POSTing to Raygun now takes ~56ms including SSL handshakes. This behaviour can be disabled in code if desired to fall back to blocking socket sends. Async sending is also unavailable on Windows due to a bug in PHP 5.3, and as a result it uses cURL processes. This can be disabled if your server is running a newer environment; please create an issue if you'd like help with this.

As of 1.9.0, you can now toggle asynchronous sending through the Raygun settings page in the admin dashboard.
---------

Changelog
---------
- 2.0.0: Switch to Composer for dependency management; Bump Raygun4PHP dependency to v2.3.0; Use new async sending guzzle (adds support for async on Windows); Switch Raygun4JS dependency to grab latest CDN distribution; Add error type tagging; Log errors that fail to send to Raygun; Add setting to disable tracking on admin pages; Rename Mindscape namespace to Raygun (src); Improve RaygunClientManager such that setting changes take effect immediately; Correct relationship between error handler and shutdown handler; Miscellaneous bug fixes, code improvements, UI and documentation updates
- 1.9.3: Updated User Tracking to Customers.
- 1.9.2: Update Pulse to Real User Monitoring (RUM)
- 1.9.1: Don't set user cookie when user tracking is disabled.
Expand Down
11 changes: 5 additions & 6 deletions about.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@

<ol>
<li><a href="https://app.raygun.com/signup?utm_source=link&amp;utm_medium=text&amp;utm_campaign=wp-plugin-setup" target="_blank">Create a Raygun account</a>.</li>
<li>Go to the <a href="https://app.raygun.com" target="_blank">Raygun dashboard</a> and create a new application. <span class="rg4wp-helptip">This represents your website.</span></li>
<li>Go to the <a href="<?php menu_page_url('rg4wp-settings', true); ?>">Raygun4WP settings page.</a></li>
<li>Paste your API key into the API key field.</li>
<li>Enable Crash Reporting and Real User Monitoring.</li>
<li>Click Save Changes.</li>
<li>Done!</li>
<li>Go to the <a href="https://app.raygun.com" target="_blank">Raygun dashboard</a> and create a new application. Your API key can be found in Application Settings.</li>
<li>Go to the <a href="<?php menu_page_url('rg4wp-settings', true); ?>">Raygun settings page</a> in your WordPress admin panel.</li>
<li>Paste your Raygun API key into the API key field.</li>
<li>Enable Crash Reporting and Real User Monitoring. Make any additional configurations as needed.</li>
<li><b>Click Save Changes.</b></li>
</ol>

</div>
Expand Down
Binary file added assets/banner-1544x500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/banner-772x250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions main.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ function rg4wp_dash() {

function rg4wp_admin() {
$logourl = plugins_url('img/logo.png', __FILE__);
add_menu_page('Raygun4WP', 'Raygun4WP', 'administrator', 'rg4wp', 'rg4wp_about', $logourl);
add_submenu_page('rg4wp', 'About Raygun4WP', 'About', 'administrator', 'rg4wp', 'rg4wp_about');
add_menu_page('Raygun', 'Raygun', 'administrator', 'rg4wp', 'rg4wp_about', $logourl);
add_submenu_page('rg4wp', 'About Raygun', 'About', 'administrator', 'rg4wp', 'rg4wp_about');
add_submenu_page('rg4wp', 'Settings', 'Settings', 'administrator', 'rg4wp-settings', 'rg4wp_settings');
add_submenu_page('rg4wp', 'Dashboard', 'Dashboard', 'administrator', 'rg4wp-dash', 'rg4wp_dash');
}
Expand Down
8 changes: 5 additions & 3 deletions raygun4wp.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<?php
/*
Plugin Name: Raygun4WP
Plugin Name: Raygun
Plugin URI: http://github.com/mindscapehq/raygun4wordpress
Description: Exceptional error, performance, user tracking and more with Raygun.com. This service integrates Raygun Crash Reporting which lets you monitor your site's health with beautiful graphs and comprehensive reports, so you are always aware of any points of failure. With Raygun's Real User Monitoring you can monitor the performance of every individual user session, so you can discover and fix fundamental bottlenecks that affect your end user experience. This plugin has a simple one-minute, no-code-required installation.
Version: 2.0.0.0
Author: Mindscape
Requires at least: 5.3
Requires PHP: 7.4
Author: Raygun
Author URI: http://raygun.com
License: MIT
*/
Expand All @@ -21,7 +23,7 @@ function rg4wp_warn_php() {
return;
} else if (is_multisite() && !$multisite_support_enabled) {
function rg4wp_warn_multisite() {
echo '<div class=\'updated fade\'><p><strong>Raygun4WP:</strong> This plugin is not guaranteed to work on multisite installations with certain environments. Please contact <a href="http://raygun.com/about/contact">Raygun</a> for more information.</p></div>';
echo '<div class=\'updated fade\'><p><strong>Raygun4WP:</strong> This plugin is not guaranteed to work with multisite installations in certain environments.</p></div>';
}
add_action('admin_notices', 'rg4wp_warn_multisite');
} else {
Expand Down
Loading

0 comments on commit 28cbfcb

Please sign in to comment.