Connect PD Guard Pro error monitoring to Sentry in WHMCS

Skip to main content
Print

Connect PD Guard Pro error monitoring to Sentry in WHMCS

PD Guard Pro can send captured PHP fatal errors and uncaught exceptions from your WHMCS installation to your own Sentry project. Configure the destination and check a harmless test event before enabling automatic forwarding.

Prepare the project and data handling

Use a Sentry project your team controls. In that project’s Client Keys (DSN) settings, copy its public HTTPS DSN, as described in Sentry’s DSN guide. Use the complete DSN supplied for the project; do not substitute an account API token or manually guess the destination.

Before enabling forwarding, review who can access the project and how errors are handled. PD Guard omits request cookies, the submitted form body, query strings and exception-call arguments. However, events can still contain error messages, stack details, filenames, server information and the request URL path. Error text itself may include sensitive values. Do not assume every event is automatically sanitised by the module.

Review the relevant Sentry data-scrubbing settings for your project. Processing by the destination is different from removing data before it leaves the billing server. If your intended data handling cannot be established, leave forwarding off and review it with the team responsible for your Sentry project before sending actual errors. PD Guard’s settings do not expose a custom event-redaction control.

Save the destination

  1. Open PD Modules → Guard → Settings with Pro access active.
  2. Leave Pro: forward errors to Sentry off while checking the destination.
  3. Paste the project’s DSN into Pro: Sentry DSN. Choose a Pro: Sentry environment label that identifies this installation’s purpose.
  4. Set Pro: event sample rate (%) to the intended whole-number percentage within the displayed range. A lower percentage randomly omits some automatically captured events; it is not a priority filter.
  5. Choose Save settings, then open Error Monitoring. Check the Project hint and environment. Configured — not enabled confirms a recognised DSN with forwarding off; it does not prove delivery.

Send and confirm a test event

Choose Send test event on Error Monitoring, then inspect the intended Sentry project for the PD Guard test message at that time. The test is available while automatic forwarding is off and is separate from automatic-event sampling. You do not need to deliberately crash the billing site or generate a customer error.

The module records Last test. A successful send means the destination returned an HTTP success response; check the event in the project as well. If it is absent, review the selected project, environment and time filters before repeating the test. A failure calls for checking the DSN and outbound connection with your hosting administrator, not disabling connection protection.

Enable automatic forwarding

Once the test is visible and the data handling is suitable, return to Settings, enable Pro: forward errors to Sentry, and save. Revisit Error Monitoring to check the forwarding status, environment, Events sent and any Last error sent value.

These counters concern automatically forwarded errors that received a success response; the test updates its own result instead. This integration captures selected fatal errors and uncaught exceptions on requests where its handlers are loaded. It is not a promise to capture every warning, handled application error or failure before the module starts, and it does not provide browser-session recordings or a complete performance trace.

Do not include the DSN, private project data, customer error contents or credentials in public screenshots.

See the PD Guard WHMCS guide for related tasks, or explore PD Guard.

Table of Contents

Get your website online with PD Hosting

UK hosting, domains and support from a real team. From a first site to a full server.

Terms and Conditions  ·  Privacy Policy

PD Hosting is the trading name of Projektif Digital Ltd, registered in England and Wales, company number 12482555.

PD Hosting
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.