This ProcessWire module integrates Sentry error tracking into your ProcessWire back-end, with additional support for front-end error tracing through the Sentry JS SDK.
- Features
- Prerequisites
- Installation
- Configuration
- Event Viewer
- Troubleshooting
- Development
- Contributing
- License
- Backend ProcessWire error tracing with Sentry
- Front-end ProcessWire error tracing with Sentry JS SDK
- A simple event viewer in the ProcessWire admin dashboard
- ProcessWire 3.x
- PHP 8.2 or higher
- Composer
- Nuxt
- Download the latest release of the module from the releases page.
- Extract the downloaded archive and place the
ProcessWireSentry
directory in your ProcessWire project'ssite/modules
directory. - Log in to the ProcessWire admin and go to
Modules > Refresh
to refresh the module list. - Install the
ProcessWire Sentry Integration
module.
Go to the module settings in the ProcessWire admin and configure the following fields:
- Sentry DSN: Your Sentry DSN.
- Project ID: Your Sentry project ID.
- Organization ID: Your Sentry organization ID.
- Auth Token: Your Sentry auth token.
- Trace Sample Rate: The trace sample rate for Sentry (e.g., 1.0 for 100% sampling, 0.5 for 50% sampling).
Once the module is installed and configured, you can view the latest events sent to Sentry directly in the ProcessWire admin interface. Navigate to the module configuration page, and the Nuxt.js application will display the events.
- If you encounter any issues with the module, please check the issues page to see if it has already been reported. If not, feel free to open a new issue with a detailed description of the problem.
To set up this project locally or run without using a release version. Follow the instructions below. If you do not want the event-viewer, and simply want error tracing through Sentry you can safely remove the event-viewer directory.
-
Clone repository
gh repo clone ryntab/ProcessWire-Sentry || https://github.com/ryntab/ProcessWire-Sentry.git
-
Install Composer packages
composer update
-
Setup Nuxt event-viewer
cd event-viewer npm run install && npm run generate
To make changes to the event-viewer Nuxt app. Follow the instructions below.
-
Clone repository
gh repo clone ryntab/ProcessWire-Sentry || https://github.com/ryntab/ProcessWire-Sentry.git
-
Navigate to event-viewer directory
cd event-viewer npm run install && npm run dev
-
In order to fetch issues from the Sentry API, an app integration token needs to be generated and your current working local environment URL needs to be whitelisted for the app integration. You will also need to set your environment variables for
SENTRY_DSN
,SENTRY_PROJECT_ID
,SENTRY_ORGANIZATION_ID
andSENTRY_AUTH_TOKEN
which are loaded in the Nuxt config.runtimeConfig: { public: { SENTRY_DSN: process.env.SENTRY_DSN, SENTRY_PROJECT_ID: process.env.SENTRY_PROJECT_ID, SENTRY_ORGANIZATION_ID: process.env.SENTRY_ORGANIZATION_ID, SENTRY_AUTH_TOKEN: process.env.SENTRY_AUTH_TOKEN } }
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.