PHPackages                             errorwatch/sdk-symfony - 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. errorwatch/sdk-symfony

ActiveSymfony-bundle[Logging &amp; Monitoring](/categories/logging)

errorwatch/sdk-symfony
======================

Symfony bundle for error monitoring with ErrorWatch

v0.3.8(4mo ago)08MITPHPPHP &gt;=8.1CI passing

Since Feb 20Pushed 4mo agoCompare

[ Source](https://github.com/MakFly/errorwatch-sdk-symfony)[ Packagist](https://packagist.org/packages/errorwatch/sdk-symfony)[ RSS](/packages/errorwatch-sdk-symfony/feed)WikiDiscussions main Synced 2mo ago

READMEChangelogDependencies (13)Versions (16)Used By (0)

ErrorWatch Symfony Bundle
=========================

[](#errorwatch-symfony-bundle)

Symfony bundle for error monitoring, APM, and session replay with [ErrorWatch](https://errorwatch.io). Captures exceptions, request traces, and user context automatically.

Requirements
------------

[](#requirements)

- PHP 8.1+
- Symfony 6.0+ / 7.0+ / 8.0+

Installation
------------

[](#installation)

```
composer require errorwatch/sdk-symfony

# Initialize configuration
php bin/console errorwatch:setup
```

The `errorwatch:setup` command:

- Creates `config/packages/error_watch.yaml` with all default settings
- Appends environment variables to `.env` (and `.env.local` if it exists)
- Is idempotent: safe to run multiple times

Configure your API key in `.env.local`:

```
ERRORWATCH_ENDPOINT=https://acme.errorwatch.io
ERRORWATCH_API_KEY=your_api_key_here
```

### Without Symfony Flex

[](#without-symfony-flex)

1. Register the bundle in `config/bundles.php`:

```
return [
    // ...
    ErrorWatch\Symfony\ErrorWatchBundle::class => ['all' => true],
];
```

2. Create `config/packages/error_watch.yaml`:

```
error_watch:
    enabled: '%env(bool:ERRORWATCH_ENABLED)%'
    endpoint: '%env(default::ERRORWATCH_ENDPOINT)%'
    api_key: '%env(default::ERRORWATCH_API_KEY)%'
    environment: '%env(default::ERRORWATCH_ENV)%'
    release: '%env(default::ERRORWATCH_RELEASE)%'
```

3. Add environment variables to `.env`:

```
ERRORWATCH_ENABLED=true
ERRORWATCH_ENDPOINT=https://api.errorwatch.io
ERRORWATCH_API_KEY=your_api_key_here
```

Configuration
-------------

[](#configuration)

Environment variables (supported by both Flex and manual installation):

VariableDescriptionDefault`ERRORWATCH_ENABLED`Enable/disable the bundle`true``ERRORWATCH_ENDPOINT`API endpoint URL(empty)`ERRORWATCH_API_KEY`Your ErrorWatch API key(empty)`ERRORWATCH_ENV`Environment name`kernel.environment``ERRORWATCH_RELEASE`Release version(auto-detected from git)Features
--------

[](#features)

### Exception Tracking

[](#exception-tracking)

Automatic — captures all `KernelEvents::EXCEPTION` and sends them to ErrorWatch in best-effort mode (1s timeout, silent errors). No code required.

### Console Command Errors

[](#console-command-errors)

Captures exceptions and non-zero exit codes from Symfony console commands (cron jobs, imports, workers).

```
error_watch:
  console:
    enabled: true              # default: true
    capture_exit_codes: true   # default: true
```

### Messenger Worker Errors

[](#messenger-worker-errors)

Captures message failures in Symfony Messenger workers. Requires `symfony/messenger`.

```
error_watch:
  messenger:
    enabled: true              # default: true
    capture_retries: false     # default: false (only final failures)
```

### Security Events

[](#security-events)

Captures login failures and optionally login successes as breadcrumbs. Requires `symfony/security-bundle`.

```
error_watch:
  security:
    enabled: true              # default: true
    capture_login_success: false  # default: false
```

### APM &amp; Request Tracking

[](#apm--request-tracking)

```
error_watch:
  apm:
    enabled: true              # default: true
    request_tracking: true     # default: true
    excluded_routes: ['_profiler', '_wdt']
```

### Outgoing HTTP Client Tracking

[](#outgoing-http-client-tracking)

Traces outgoing HTTP calls as APM spans. Adds breadcrumbs for 5xx responses.

```
error_watch:
  apm:
    http_client:
      enabled: true                      # default: true
      capture_errors_as_breadcrumbs: true # default: true
```

### Doctrine Query Tracing

[](#doctrine-query-tracing)

Requires `doctrine/dbal`:

```
error_watch:
  apm:
    doctrine:
      enabled: true            # default: true
      log_queries: true        # default: true
```

### Deprecation Tracking

[](#deprecation-tracking)

Captures PHP `E_DEPRECATED` / `E_USER_DEPRECATED` errors. Opt-in (can be noisy).

```
error_watch:
  deprecations:
    enabled: false             # default: false (opt-in)
```

### Monolog Forwarding

[](#monolog-forwarding)

Requires `monolog/monolog`:

```
error_watch:
  monolog:
    enabled: true              # default: true
    level: warning             # default: warning
    excluded_channels: [event, doctrine, http_client]
    capture_context: true
    capture_extra: true
```

### User Context

[](#user-context)

Requires `symfony/security-bundle`:

```
error_watch:
  user_context:
    enabled: true              # default: true
    capture_ip: true           # default: true
```

### Session Replay (Twig)

[](#session-replay-twig)

Requires `symfony/twig-bundle`:

```
error_watch:
  replay:
    enabled: true
    sample_rate: 0.1           # default: 0.1
    debug: false               # default: false
```

Add the script to your base template:

```
{# base.html.twig #}
{{ error_watch_replay_script() }}
```

### Breadcrumbs

[](#breadcrumbs)

Automatic breadcrumbs are collected for HTTP requests, SQL queries, console commands, security events, and outgoing HTTP calls.

```
error_watch:
  breadcrumbs:
    enabled: true              # default: true
    max_count: 100             # default: 100, max: 500
```

Full Configuration Reference
----------------------------

[](#full-configuration-reference)

```
error_watch:
  enabled: true
  endpoint: 'https://api.errorwatch.io'
  api_key: 'your-api-key'
  environment: '%env(APP_ENV)%'
  release: ~                   # auto-detects from git or APP_VERSION env
  replay:
    enabled: false
    sample_rate: 0.1
    debug: false
  breadcrumbs:
    enabled: true
    max_count: 100
  user_context:
    enabled: true
    capture_ip: true
  console:
    enabled: true
    capture_exit_codes: true
  messenger:
    enabled: true
    capture_retries: false
  deprecations:
    enabled: false
  security:
    enabled: true
    capture_login_success: false
  apm:
    enabled: true
    request_tracking: true
    excluded_routes: ['_profiler', '_wdt']
    doctrine:
      enabled: true
      log_queries: true
    http_client:
      enabled: true
      capture_errors_as_breadcrumbs: true
  monolog:
    enabled: true
    level: warning
    excluded_channels: [event, doctrine, http_client]
    capture_context: true
    capture_extra: true
```

Quality
-------

[](#quality)

```
composer test       # PHPUnit tests
composer stan       # PHPStan analysis (level 6)
composer lint       # PHP-CS-Fixer dry run
composer cs:fix     # PHP-CS-Fixer auto-fix
```

License
-------

[](#license)

MIT

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance76

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~0 days

Total

14

Last Release

130d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/36bd784d4a0a99b303da318f09603e9861ed9a0cabc2135103eb9954f2d7362c?d=identicon)[MakFly](/maintainers/MakFly)

---

Top Contributors

[![MakFly](https://avatars.githubusercontent.com/u/6107225?v=4)](https://github.com/MakFly "MakFly (14 commits)")

---

Tags

symfonybundleexceptionapmerror-monitoringerrorwatch

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/errorwatch-sdk-symfony/health.svg)

```
[![Health](https://phpackages.com/badges/errorwatch-sdk-symfony/health.svg)](https://phpackages.com/packages/errorwatch-sdk-symfony)
```

###  Alternatives

[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

515100.5k3](/packages/web-auth-webauthn-framework)[web-auth/webauthn-symfony-bundle

FIDO2/Webauthn Security Bundle For Symfony

66529.9k11](/packages/web-auth-webauthn-symfony-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M203](/packages/sulu-sulu)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[inspector-apm/inspector-symfony

Code Execution Monitoring for Symfony applications.

2839.2k10](/packages/inspector-apm-inspector-symfony)

PHPackages © 2026

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