sentry / sentry-agent
Sentry Agent for PHP (https://sentry.io)
Requires
- php: ^7.2|^8
- ext-json: *
- sentry/sentry: ^4.15.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.70
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^8.5|^9.6
This package is auto-updated.
Last update: 2026-05-18 13:20:37 UTC
README
Bad software is everywhere, and we're tired of it. Sentry is on a mission to help developers write better software faster, so we can get back to enjoying technology. If you want to join us Check out our open positions
Official Sentry Agent for PHP
Caution
The current state of this project is somewhere along the lines of pre-alpha.
We strongly recommend you to not run this in production.
During the 0.x release cycle, we might introduce breaking changes at any time.
Getting started
Install
Install the agent alongside the PHP SDK using Composer.
composer require sentry/sentry sentry/sentry-agent
Configuration
Use the SDK-provided agent client as the custom HTTP client for the PHP (also Symfony & Laravel) SDKs.
use Sentry\Agent\Transport\AgentClientBuilder; Sentry\init([ 'dsn' => '___PUBLIC_DSN___', 'http_client' => AgentClientBuilder::create()->getClient(), ]);
Usage
vendor/bin/sentry-agent
Configuration
vendor/bin/sentry-agent [options]
--listen=ADDRESS, defaults to127.0.0.1:5148--upstream-timeout=SECONDS, defaults to2.0seconds--upstream-concurrency=REQUESTS, defaults to10--queue-limit=ENVELOPES, the amount of envelopes to keep in memory, defaults to1000--drain-timeout=SECONDS, defaults to10.0seconds--control-server=ADDRESS, enables the HTTP control server on the specified address--http-proxy=URL, forwards upstream envelope requests through an HTTP CONNECT proxy--http-proxy-authentication=AUTH, credentials for proxy basic authentication inusername:passwordformat
License
Licensed under the MIT license, see LICENSE