Skip to content

Commit d163cca

Browse files
authored
Update README.md
1 parent 86ba07e commit d163cca

File tree

1 file changed

+90
-11
lines changed

1 file changed

+90
-11
lines changed

README.md

Lines changed: 90 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,110 @@
1-
![ProcessWire Sentry](/docs/Banner.jpg)
2-
# ProcessWire Sentry Integration Module
3-
![example workflow](https://github.com/ryntab/ProcessWire-Sentry/actions/workflows/generate-event-viewer.yml/badge.svg)
41

2+
# ProcessWire Sentry Integration Module
53

6-
This ProcessWire module integrates Sentry error tracking into your ProcessWire site, with additional support for viewing live Sentry events.
4+
![example workflow](https://github.com/ryntab/ProcessWire-Sentry/actions/workflows/build.yml/badge.svg)
5+
6+
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.
77

88
## 🚧 This module is not production ready
99

10+
## Table of Contents
11+
- [Features](#features)
12+
- [Prerequisites](#prerequisites)
13+
- [Installation](#installation)
14+
- [Configuration](#configuration)
15+
- [Event Viewer](#event-viewer)
16+
- [Troubleshooting](#troubleshooting)
17+
- [Development](#development)
18+
- [Build Module Locally](#build-module-locally)
19+
- [Modify Event Viewer Locally](#modify-event-viewer-locally)
20+
- [Contributing](#contributing)
21+
- [License](#license)
22+
1023
## Features
24+
- Backend ProcessWire error tracing with Sentry
25+
- Front-end ProcessWire error tracing with Sentry JS SDK
26+
- A simple event viewer in the ProcessWire admin dashboard
1127

12-
- Configure Sentry DSN, Project ID, Organization ID, and Auth Token.
13-
- Set the trace sample rate for Sentry.
14-
- View the latest events sent to Sentry in an embedded Nuxt.js application.
28+
## Prerequisites
29+
- ProcessWire 3.x
30+
- PHP 8.2 or higher
31+
- Composer
32+
- Nuxt
1533

16-
## Configure
34+
## Installation
35+
1. Download the latest release of the module from the [releases page](https://github.com/ryntab/ProcessWire-Sentry/releases).
36+
2. Extract the downloaded archive and place the `ProcessWireSentry` directory in your ProcessWire project's `site/modules` directory.
37+
3. Log in to the ProcessWire admin and go to `Modules > Refresh` to refresh the module list.
38+
4. Install the `ProcessWire Sentry Integration` module.
1739

40+
## Configuration
1841
Go to the module settings in the ProcessWire admin and configure the following fields:
19-
2042
- Sentry DSN: Your Sentry DSN.
2143
- Project ID: Your Sentry project ID.
2244
- Organization ID: Your Sentry organization ID.
2345
- Auth Token: Your Sentry auth token.
2446
- Trace Sample Rate: The trace sample rate for Sentry (e.g., 1.0 for 100% sampling, 0.5 for 50% sampling).
25-
Usage
2647

2748
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.
2849

50+
## Troubleshooting
51+
- If you encounter any issues with the module, please check the [issues](https://github.com/ryntab/ProcessWire-Sentry/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.
52+
-
2953
## Event Viewer
3054

31-
![ProcessWire Sentry](/docs/event-viewer-demo.jpg)
55+
![ProcessWire Sentry](/docs/event-viewer-demo.gif)
56+
57+
## Development
58+
59+
### Build Module Locally
60+
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.
61+
62+
1. Clone repository
63+
64+
```bash
65+
gh repo clone ryntab/ProcessWire-Sentry || https://github.com/ryntab/ProcessWire-Sentry.git
66+
```
67+
68+
3. Install Composer packages
69+
70+
```bash
71+
composer update
72+
```
73+
74+
4. Setup Nuxt event-viewer
75+
76+
```bash
77+
cd event-viewer
78+
npm run install && npm run generate
79+
```
80+
81+
### Modify Event Viewer Locally.
82+
To make changes to the event-viewer Nuxt app. Follow the instructions below.
83+
1. Clone repository
84+
85+
```
86+
gh repo clone ryntab/ProcessWire-Sentry || https://github.com/ryntab/ProcessWire-Sentry.git
87+
```
88+
3. Navigate to event-viewer directory
89+
90+
```
91+
cd event-viewer
92+
npm run install && npm run dev
93+
```
94+
5. 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` and `SENTRY_AUTH_TOKEN` which are loaded in the Nuxt config.
95+
96+
97+
```js
98+
runtimeConfig: {
99+
public: {
100+
SENTRY_DSN: process.env.SENTRY_DSN,
101+
SENTRY_PROJECT_ID: process.env.SENTRY_PROJECT_ID,
102+
SENTRY_ORGANIZATION_ID: process.env.SENTRY_ORGANIZATION_ID,
103+
SENTRY_AUTH_TOKEN: process.env.SENTRY_AUTH_TOKEN
104+
}
105+
}
106+
```
107+
108+
## Contributing
109+
110+
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

0 commit comments

Comments
 (0)