1
1
# Integration — Sentry exceptions
2
2
3
- Buggregator offers seamless integration with Sentry reports, making it a reliable tool for local development. With
4
- it, you can easily configure your Sentry DSN to send data directly to the server, providing you with a lightweight
5
- alternative for debugging your application .
3
+ Buggregator integrates seamlessly with Sentry reports, making it ideal for local development. You can easily configure
4
+ your app to send data to the Buggregator server, offering a lightweight alternative for debugging without any limits
5
+ or registration. Send exceptions as many times as you need, without any restrictions .
6
6
7
7
![ sentry] ( https://github.com/buggregator/server/assets/773481/e979fda5-54c8-42cc-8224-a1c5d828569a )
8
8
9
- By using Buggregator to receive Sentry reports, you can identify and fix issues with your application before deploying
10
- it to production. This ensures that your application is robust and efficient, providing a smooth experience for your
11
- users. So, if you're looking for an easy and efficient way to receive Sentry reports during local development,
12
- Buggregator is the perfect tool for you.
9
+ Using Buggregator with Sentry helps you identify and fix issues before production, ensuring a smooth user experience.
10
+ For easy and efficient Sentry report handling during development, choose Buggregator.
11
+
12
+ > ** Note:** For local debugging, Buggregator is an excellent tool, but Sentry is the recommended solution for full-scale
13
+ > production needs.
13
14
14
15
## What is Sentry?
15
16
50
51
51
52
### Installation
52
53
53
- Magento 2 is supported via the following package, you can read more about it [ here] ( https://github.com/justbetter/magento2-sentry )
54
+ Magento 2 is supported via the following package, you can read more about
55
+ it [ here] ( https://github.com/justbetter/magento2-sentry )
54
56
55
57
### Configuration
56
58
70
72
...
71
73
]
72
74
```
75
+
73
76
in the ` app/etc/env.php `
74
77
78
+ ## WordPress
79
+
80
+ ### Installation and configuration
81
+
82
+ > Make sure ` WP_ENVIRONMENT_TYPE ` is set to ` local ` . [ Local] ( https://localwp.com/ ) (by WPEngine) does that by default.
83
+
84
+ 1 . Install [ WP Sentry] ( https://wordpress.org/plugins/wp-sentry-integration/ ) . You don't have to activate it. We
85
+ will [ load it early] ( https://github.com/stayallive/wp-sentry/tree/v7.13.0?tab=readme-ov-file#loading-sentry-before-wordpress ) ,
86
+ to catch errors early.
87
+
88
+ 2 . In ` wp-config.php ` add:
89
+
90
+ ``` php
91
+ // NOTE: WP_ENVIRONMENT_TYPE must be defined and set to 'local'.
92
+ if (defined('WP_ENVIRONMENT_TYPE') && 'local' === WP_ENVIRONMENT_TYPE) {
93
+ define( 'WP_SENTRY_PHP_DSN', 'http://
[email protected] :8000/1' );
94
+ define( 'WP_SENTRY_ERROR_TYPES', E_ALL & ~E_NOTICE & ~E_USER_NOTICE );
95
+ require_once __DIR__ . '/wp-content/plugins/wp-sentry-integration/wp-sentry.php';
96
+ }
97
+ ```
98
+
99
+ ## JavaScript
100
+
101
+ Buggregator provides an HTTP endpoint ` /sentry/<project>.js ` to include in your project. It's a fast and easy way to
102
+ start using Buggregator with your JavaScript application.
103
+
104
+ Read more about the [ Sentry JavaScript SDK] ( https://docs.sentry.io/platforms/javascript/#install )
105
+
106
+ In order to get started using the Sentry JavaScript SDK, add the following code to the top of your application, before
107
+ all other scripts:
108
+
109
+ ``` html
110
+
111
+ <script src =" http://127.0.0.1:8000/sentry/1.js" ></script >
112
+ ```
113
+
114
+ This script will load the Sentry SDK and configure it to send errors to the Buggregator.
115
+
116
+ ### Configuration
117
+
118
+ Before you can use it, you need to configure server ENV variables. By default, Buggregator uses the following ENV
119
+ variables:
120
+
121
+ ``` dotenv
122
+ # Sentry SDK URL (Actual version can be found here https://docs.sentry.io/platforms/javascript/install/loader/#cdn)
123
+ SENTRY_JS_SDK_URL=https://browser.sentry-cdn.com/7.69.0/bundle.tracing.replay.min.js
124
+
125
+ # Sentry DSN host that will be used in the SDK
126
+ SENTRY_JS_DSN_HOST=http://[email protected] :8000
127
+ ```
128
+
129
+ You can override them by setting the following ENV variables:
130
+
131
+ ``` bash
132
+ docker run --pull always \
133
+ -p ... \
134
+ -e SENTRY_JS_DSN_HOST=http://
[email protected] :8000 \
135
+ -e SENTRY_JS_SDK_URL=https://browser.sentry-cdn.com/7.69.0/bundle.tracing.replay.min.js \
136
+ ghcr.io/buggregator/server:latest
137
+ ```
138
+
139
+ > ** Note:** Read more about server configuration [ here] ( ../getting-started.md ) .
140
+
75
141
## Other platforms
76
142
77
143
To report to Buggregator you’ll need to use a language-specific SDK. The Sentry team builds and maintains these for most
@@ -82,3 +148,34 @@ After you have installed the SDK, you can configure Sentry DSN to report to Bugg
82
148
``` dotenv
83
149
SENTRY_DSN=http://[email protected] :8000/1
84
150
```
151
+
152
+ ## Secret key validation
153
+
154
+ Buggregator lets you send exceptions freely by default, but you can boost your security by setting up a secret key.
155
+
156
+ In our example, we will use ` my-secret-key ` as the secret key. Let's see how to set it up.
157
+
158
+ ### Server configuration
159
+
160
+ To use a secret key, set the ` SENTRY_SECRET_KEY ` environment variable on your server.
161
+
162
+ ** Here’s how to do it:**
163
+
164
+ ``` bash
165
+ docker run --pull always \
166
+ -p ... \
167
+ -e SENTRY_SECRET_KEY=my-secret-key \
168
+ ghcr.io/buggregator/server:latest
169
+ ```
170
+
171
+ > ** Note:** Read more about server configuration [ here] ( ../getting-started.md ) .
172
+
173
+ When you set the secret key, the server checks the ` X-Sentry-Auth ` header to make sure it matches the secret key.
174
+
175
+ ### Client configuration
176
+
177
+ To set the secret key on a client, change your DSN like this:
178
+
179
+ ``` dotenv
180
+ SENTRY_DSN=http://my-secret-key:[email protected] :8000/1
181
+ ```
0 commit comments