sentry/sentry-agent

Sentry Agent for PHP (https://sentry.io)

Maintainers

Package info

github.com/getsentry/sentry-php-agent

Homepage

pkg:composer/sentry/sentry-agent

Fund package maintenance!

sentry.io/pricing

sentry.io

Statistics

Installs: 259

Dependents: 0

Suggesters: 0

Stars: 7

Open Issues: 5

0.1.1 2025-09-05 10:03 UTC

README

Sentry

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 [listen_address] [listen_port] [upstream_timeout] [upstream_concurrency] [queue_limit]
  • listen_address, defaults to 127.0.0.1
  • listen_port, defaults to 5148
  • upstream_timeout, defaults to 2.0 seconds
  • upstream_concurrency, defaults to 10
  • queue_limit, the amount of envelopes to keep in memory, defaults to 1000

License

Licensed under the MIT license, see LICENSE