PHPackages                             sentry/sentry-agent - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. sentry/sentry-agent

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

sentry/sentry-agent
===================

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

1.0.0(3w ago)7441↓10.7%1[3 issues](https://github.com/getsentry/sentry-php-agent/issues)MITPHPPHP ^7.2|^8CI failing

Since Jun 7Pushed 3w ago22 watchersCompare

[ Source](https://github.com/getsentry/sentry-php-agent)[ Packagist](https://packagist.org/packages/sentry/sentry-agent)[ Docs](https://sentry.io)[ Fund](https://sentry.io/)[ Fund](https://sentry.io/pricing/)[ RSS](/packages/sentry-sentry-agent/feed)WikiDiscussions main Synced yesterday

READMEChangelog (3)Dependencies (5)Versions (16)Used By (0)

 [    ![Sentry](https://camo.githubusercontent.com/370976471962ea536bf254c85b756ea56af48b88193fe69bf4ae266fb9f56be8/68747470733a2f2f73656e7472792d6272616e642e73746f726167652e676f6f676c65617069732e636f6d2f73656e7472792d6c6f676f2d626c61636b2e706e67)  ](https://sentry.io/?utm_source=github&utm_medium=logo)

*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**](https://sentry.io/careers/)*

Official Sentry Agent for PHP
=============================

[](#official-sentry-agent-for-php)

Getting started
---------------

[](#getting-started)

### What is the Agent?

[](#what-is-the-agent)

The Agent is a sidecar to the PHP application that is meant to run on the same machine in order to accept outgoing HTTP requests to Sentry and send them asynchronously without blocking the main PHP script.

### Install

[](#install)

Install the agent alongside the [PHP SDK](https://github.com/getsentry/sentry-php) using [Composer](https://getcomposer.org/).

```
composer require sentry/sentry sentry/sentry-agent
```

### Configuration

[](#configuration)

Use the SDK-provided agent client as the custom HTTP client for the [PHP](https://github.com/getsentry/sentry-php) (also [Symfony](https://github.com/getsentry/sentry-symfony) &amp; [Laravel](https://github.com/getsentry/sentry-laravel)) SDKs.

```
use Sentry\Agent\Transport\AgentClientBuilder;

Sentry\init([
    'dsn' => '___PUBLIC_DSN___',
    'http_client' => AgentClientBuilder::create()->getClient(),
]);
```

### Usage

[](#usage)

```
vendor/bin/sentry-agent
```

#### Configuration

[](#configuration-1)

```
vendor/bin/sentry-agent [options]
```

- `--listen=ADDRESS`, defaults to `127.0.0.1:5148`
- `--upstream-timeout=SECONDS`, defaults to `2.0` seconds
- `--upstream-concurrency=REQUESTS`, defaults to `10`
- `--queue-limit=ENVELOPES`, the amount of envelopes to keep in memory, defaults to `1000`
- `--drain-timeout=SECONDS`, defaults to `10.0` seconds
- `--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 in `username:password` format

License
-------

[](#license)

Licensed under the MIT license, see [`LICENSE`](LICENSE)

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance87

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~92 days

Total

4

Last Release

23d ago

Major Versions

0.1.1 → 1.0.02026-06-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/122e44894684040bbecb610a52805f7bfd3ee5f27e644183c10ffc73df23ee17?d=identicon)[zeeg](/maintainers/zeeg)

![](https://www.gravatar.com/avatar/fe5ccdddb1a96018b48de2d474f6d253228ab68304d3a5ebfbdccfc8f341e027?d=identicon)[HazAT](/maintainers/HazAT)

![](https://www.gravatar.com/avatar/073f050f44e9fae015e8f5beffbe0001382b62ed410998af6acb9665626b51e6?d=identicon)[Sentry](/maintainers/Sentry)

![](https://avatars.githubusercontent.com/u/6617432?v=4)[Michi Hoffmann](/maintainers/cleptric)[@cleptric](https://github.com/cleptric)

---

Top Contributors

[![cleptric](https://avatars.githubusercontent.com/u/6617432?v=4)](https://github.com/cleptric "cleptric (23 commits)")[![Litarnus](https://avatars.githubusercontent.com/u/8436563?v=4)](https://github.com/Litarnus "Litarnus (10 commits)")[![stayallive](https://avatars.githubusercontent.com/u/1090754?v=4)](https://github.com/stayallive "stayallive (10 commits)")[![BYK](https://avatars.githubusercontent.com/u/126780?v=4)](https://github.com/BYK "BYK (4 commits)")[![getsentry-bot](https://avatars.githubusercontent.com/u/10587625?v=4)](https://github.com/getsentry-bot "getsentry-bot (2 commits)")[![joshuarli](https://avatars.githubusercontent.com/u/14209781?v=4)](https://github.com/joshuarli "joshuarli (1 commits)")[![sentry-release-bot[bot]](https://avatars.githubusercontent.com/in/988504?v=4)](https://github.com/sentry-release-bot[bot] "sentry-release-bot[bot] (1 commits)")[![stephanie-anderson](https://avatars.githubusercontent.com/u/7096858?v=4)](https://github.com/stephanie-anderson "stephanie-anderson (1 commits)")

---

Tags

sdk-adjacenttag-production

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sentry-sentry-agent/health.svg)

```
[![Health](https://phpackages.com/badges/sentry-sentry-agent/health.svg)](https://phpackages.com/packages/sentry-sentry-agent)
```

###  Alternatives

[sentry/sentry-laravel

Laravel SDK for Sentry (https://sentry.io)

1.3k127.1M203](/packages/sentry-sentry-laravel)[sentry/sentry-symfony

Symfony integration for Sentry (http://getsentry.com)

74666.1M95](/packages/sentry-sentry-symfony)[sentry/sdk

This is a meta package of sentry/sentry. We recommend using sentry/sentry directly.

327139.0M166](/packages/sentry-sdk)[stayallive/wp-sentry

A (unofficial) WordPress plugin to report PHP and JavaScript errors to Sentry.

385220.1k](/packages/stayallive-wp-sentry)[justbetter/magento2-sentry

Magento 2 Logger for Sentry

1861.6M3](/packages/justbetter-magento2-sentry)[networkteam/sentry-client

A Sentry client for TYPO3. It forwards errors and exceptions to Sentry - https://sentry.io/

391.1M7](/packages/networkteam-sentry-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
