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

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

allstak/sdk-symfony
===================

Official AllStak Symfony bundle — drop-in, fully automatic observability for Symfony 6.4 and 7.x. One install plus an API key auto-captures errors, inbound and outbound HTTP, DB queries, logs, traces and spans, breadcrumbs, console commands, and messenger messages. Every integration is on by default and individually toggleable.

v0.1.0(1mo ago)03MITPHPPHP &gt;=8.1CI passing

Since May 30Pushed 1mo agoCompare

[ Source](https://github.com/AllStak/allstak-symfony)[ Packagist](https://packagist.org/packages/allstak/sdk-symfony)[ Docs](https://allstak.sa)[ RSS](/packages/allstak-sdk-symfony/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (15)Versions (2)Used By (0)

AllStak Symfony Bundle
======================

[](#allstak-symfony-bundle)

Official AllStak bundle for Symfony 6.4 and 7.x. Drop-in, fully automatic observability with near-zero configuration: install, set your API key, and the bundle auto-captures errors, inbound and outbound HTTP, database queries, logs, traces and spans, breadcrumbs, console commands, and Messenger messages.

Built on top of the [`allstak/sdk-php`](https://packagist.org/packages/allstak/sdk-php)core client — this bundle does not reimplement transport, it wires the core SDK into the Symfony container and event system.

Install
-------

[](#install)

```
composer require allstak/sdk-symfony
```

With Symfony Flex the bundle is registered automatically. Without Flex, add it to `config/bundles.php`:

```
return [
    // ...
    AllStak\SymfonyBundle\AllStakBundle::class => ['all' => true],
];
```

Configure
---------

[](#configure)

The only thing you need is an API key. Set it in the environment:

```
# .env
ALLSTAK_API_KEY=allstak_live_xxxxxxxx
```

That is the entire zero-config path. The bundle reads `ALLSTAK_API_KEY` on boot and turns every integration ON. For more control, add `config/packages/allstak.yaml`:

```
allstak:
    api_key: '%env(ALLSTAK_API_KEY)%'
    environment: '%kernel.environment%'
    release: '%env(default::ALLSTAK_RELEASE)%'
    service: 'my-symfony-app'
    send_default_pii: false       # default: false (auto-collected PII is scrubbed)
    sample_rate: 1.0              # fraction of exceptions to forward
    enable_offline_queue: true    # persist + replay undelivered telemetry; set false on read-only/serverless FS

    integrations:
        kernel: true              # request span, request context, inbound HTTP, exception capture
        console: true             # command spans + error capture on failure
        messenger: true           # span per handled message + error capture
        doctrine: true            # DB query records via a DBAL driver middleware
        http_client: true         # outbound HTTP records + spans + trace propagation
        monolog: true             # ship logs; promote ERROR+ with an exception to capture
```

Every integration is ON by default and individually toggleable. Optional framework pieces (console, messenger, Doctrine DBAL, HTTP client, Monolog) self-disable gracefully when their package is not installed.

What gets captured automatically
--------------------------------

[](#what-gets-captured-automatically)

AreaMechanismUnhandled errors`kernel.exception` capture with full request contextInbound HTTP`kernel.response` http-request record (method, path, host, status, time)Request spans`kernel.request` -&gt; `kernel.response` server span, joined to inbound traceBreadcrumbscontroller resolution, console commands, messages, logsOutbound HTTPdecorated `HttpClientInterface`: record + span + trace-propagation headerDatabase queriesDoctrine DBAL driver middleware: normalized query, duration, statusLogsMonolog handler: ships logs, ERROR+ with an exception becomes a captureConsole commands`ConsoleEvents` span + error capture on non-zero exitMessengermiddleware span per handled message + error capture on handler failureBuffer flush`kernel.terminate` / console terminate drains buffers after the responseManual API (bonus)
------------------

[](#manual-api-bonus)

Auto-instrumentation is the primary path. When you want explicit control, the core SDK service is autowirable:

```
use AllStak\AllStak;

final class CheckoutController
{
    public function __construct(private AllStak $allstak) {}

    public function pay(): Response
    {
        $this->allstak->addBreadcrumb('default', 'payment started');
        try {
            // ...
        } catch (\Throwable $e) {
            $this->allstak->captureError($e);
            throw $e;
        }
    }
}
```

You can also use the static facade `AllStak\Facade` anywhere after boot.

Outbound HTTP &amp; trace propagation
-------------------------------------

[](#outbound-http--trace-propagation)

The bundle decorates the framework `http_client` service, so any autowired `HttpClientInterface` call is recorded and carries a trace-propagation `baggage` header automatically. No code changes are needed:

```
public function __construct(private \Symfony\Contracts\HttpClient\HttpClientInterface $client) {}

public function fetch(): array
{
    return $this->client->request('GET', 'https://example.com/api')->toArray();
    // recorded as an outbound http-request + client span on this request's trace
}
```

Doctrine DBAL
-------------

[](#doctrine-dbal)

When `doctrine/dbal` is installed, the bundle registers a DBAL **driver middleware** (the modern, non-deprecated instrumentation seam). DoctrineBundle picks it up via the `doctrine.middleware` tag and applies it to every connection, so queries are recorded with zero changes to your repositories.

Messenger
---------

[](#messenger)

The bundle prepends its middleware onto the default message bus, so handled messages are instrumented automatically. If you define custom buses, add `allstak.messenger_middleware` to that bus's `middleware` list.

Local development against the core SDK
--------------------------------------

[](#local-development-against-the-core-sdk)

For local builds before the package is published, add a path repository so the core client resolves from your checkout:

```
{
    "repositories": [
        { "type": "path", "url": "../allstak-php-sdk" }
    ]
}
```

The release `require` uses the published package:

```
{
    "require": {
        "allstak/sdk-php": "^1.3"
    }
}
```

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

[](#requirements)

- PHP &gt;= 8.1
- Symfony 6.4 or 7.x
- `allstak/sdk-php` ^1.3

License
-------

[](#license)

MIT

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance89

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

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

Unknown

Total

1

Last Release

56d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/271468985?v=4)[AllStak](/maintainers/AllStak)[@AllStak](https://github.com/AllStak)

---

Tags

symfonyloggingmonitoringapmtracingSymfony Bundleobservabilityerror-trackingallstak

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M400](/packages/easycorp-easyadmin-bundle)

PHPackages © 2026

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