Skip to content

Commit d15719d

Browse files
committed
tweak: object-oriented sentry
1 parent 766786c commit d15719d

7 files changed

Lines changed: 711 additions & 64 deletions

File tree

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ dsn=https://YOUR_KEY@app.glitchtip.com/YOUR_PROJECT
102102

103103
The DSN can point to Sentry or a compatible service such as GlitchTip.
104104

105-
WebEngine initializes the SDK when both the SDK functions and a nonempty DSN
106-
are available. No Sentry initialization in `setup.php` is necessary. Leave the
105+
WebEngine initializes an SDK client in `Application::start()` when both the SDK
106+
and a nonempty DSN are available. No Sentry initialization in `setup.php` is necessary. Leave the
107107
DSN empty in environments that should not report errors.
108108

109109
Exceptions escaping request logic are reported before the normal error page or
@@ -112,11 +112,14 @@ reported. Expected HTTP responses below 500 are excluded. Reporting failures
112112
do not replace the application's error response. Exceptions caught and handled
113113
by application code still require explicit reporting if desired.
114114

115-
The SDK's default handlers remain responsible for uncaught exceptions outside
116-
the request handler and fatal PHP errors; WebEngine does not separately report
117-
shutdown errors to avoid duplicate fatal events. Performance tracing is not
118-
enabled by this integration. Review SDK data filtering for sensitive application
119-
payloads before enabling reporting.
115+
The reporter uses an injected `Sentry\ClientInterface` and PSR-7 request, without
116+
the SDK's global hub or default integrations. WebEngine reports fatal errors
117+
through its shutdown handler once the reporter is initialized. Errors before
118+
initialization are not captured. Performance tracing is not enabled.
119+
120+
Request context includes only the HTTP method and URL without credentials,
121+
query parameters or fragments. Headers, cookies and request bodies are omitted.
122+
Exception messages may still contain sensitive data; review what your application throws.
120123

121124
# Proudly sponsored by
122125

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
},
4949

5050
"require-dev": {
51+
"sentry/sentry": "^4.0",
5152
"phpstan/phpstan": "^2.1",
5253
"phpunit/phpunit": "^12.4",
5354
"phpmd/phpmd": "^2.13",

0 commit comments

Comments
 (0)