Download the PHP package digicademy/typo3-sentry-transaction-handler without Composer
On this page you can find all versions of the php package digicademy/typo3-sentry-transaction-handler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download digicademy/typo3-sentry-transaction-handler
More information about digicademy/typo3-sentry-transaction-handler
Files in digicademy/typo3-sentry-transaction-handler
Package typo3-sentry-transaction-handler
Short Description Opens a Sentry transaction per TYPO3 request so traces_sample_rate actually produces performance data.
License GPL-2.0+
Informations about the package typo3-sentry-transaction-handler
TYPO3 Sentry Transaction Handler
A small TYPO3 extension that opens one Sentry performance transaction per HTTP
request, so that traces_sample_rate in your Sentry (or GlitchTip) configuration actually produces data in the "Performance" view.
It is intended as a companion to networkteam/sentry-client, which handles error and log forwarding but does not instrument requests for tracing.
Why this exists
The underlying sentry/sentry PHP SDK does not auto-instrument incoming HTTP
requests the way the Laravel or Symfony SDKs do. Setting traces_sample_rate on its own has no effect.
This extension registers a PSR-15 middleware that:
- opens an
http.servertransaction at the start of every frontend and backend request, - names it
METHOD /pathwithTransactionSource::url(), - binds it to the current Sentry hub so spans created inside the request attach to it,
- continues an incoming trace when
sentry-traceandbaggageheaders are present (distributed tracing), - records
setHttpStatus(...)from the response and callsfinish()in afinallyblock, so transactions close even on exceptions.
If no Sentry client is configured, the middleware is a transparent no-op.
Requirements
- PHP 8.3 – 8.5
- TYPO3 12.4, 13, or 14
networkteam/sentry-client6.x (brings insentry/sentry4.6+)
Installation
The extension is activated automatically in a Composer-managed TYPO3 install. For non-Composer installs, download it and activate it via the Extension Manager.
Configuration
All configuration is inherited from networkteam/sentry-client. In particular, set the sample rate through the usual Sentry options:
Everything the Sentry PHP SDK accepts as an option works here.
GlitchTip
This extension was written against a self-hosted GlitchTip instance, which uses the Sentry envelope protocol. No GlitchTip-specific configuration is needed.
How it works
The middleware is registered in both the frontend and backend stacks, in each case ordered before an early public anchor (typo3/cms-frontend/site and typo3/cms-backend/backend-routing respectively). It brackets the full request processing on the way in and the full response generation on the way out.
Limitations
- CLI entry points are not instrumented. Scheduler tasks, Symfony Commands, and anything else that bypasses the HTTP middleware stack will not produce transactions. If you need coverage there, wrap the command with your own
startTransaction()/finish()pair. - Transaction names use raw URL paths. This is good enough for most dashboards but can produce high-cardinality names on sites with many unique URLs. If you have a mapping of parameterized routes available, you can rename the transaction inside a subsequent middleware via
SentrySdk::getCurrentHub()->getTransaction()?->setName(...). - Every request opens a transaction, including static redirects and
/favicon.ico. Usetraces_sample_rate(ortraces_samplerfor per-request decisions) for sane sample rates.
License
GPL-2.0-or-later.
All versions of typo3-sentry-transaction-handler with dependencies
typo3/cms-core Version ^12.4 || ^13.0 || ^14.0
networkteam/sentry-client Version ^6.0
sentry/sentry Version ^4.6