PHPackages                             liuggio/statsd-client-bundle - 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. liuggio/statsd-client-bundle

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

liuggio/statsd-client-bundle
============================

Provides a statsd client and simple ready-to-use support for #Symfony2 Application

v1.8.0(4y ago)168734.2k↓62.9%42[7 issues](https://github.com/liuggio/StatsDClientBundle/issues)MITPHPPHP ^7.0 || ^8.0CI failing

Since Sep 19Pushed 4y ago8 watchersCompare

[ Source](https://github.com/liuggio/StatsDClientBundle)[ Packagist](https://packagist.org/packages/liuggio/statsd-client-bundle)[ RSS](/packages/liuggio-statsd-client-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (6)Versions (25)Used By (0)

StatsD Client Bundle
====================

[](#statsd-client-bundle)

[![Total Downloads](https://camo.githubusercontent.com/df1a2a77ca46d0a42fb2d755e572e953ae7460a38e6ad9d41d53ccc7eb9496a4/68747470733a2f2f706f7365722e707567782e6f72672f6c69756767696f2f7374617473642d636c69656e742d62756e646c652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/liuggio/statsd-client-bundle) [![Latest Stable Version](https://camo.githubusercontent.com/4f25c2ba7a0f8a993aa48808ca181b9e92b698ae8e92c153ce90dcdaf1c07a93/68747470733a2f2f706f7365722e707567782e6f72672f6c69756767696f2f7374617473642d636c69656e742d62756e646c652f762f737461626c652e706e67)](https://packagist.org/packages/liuggio/statsd-client-bundle) [![Build Status](https://camo.githubusercontent.com/c6c7ba862634a0ef25280081418bd43a22c71d776e0cb5a51bda01f1dcde0e72/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6c69756767696f2f537461747344436c69656e7442756e646c652e706e67)](http://travis-ci.org/liuggio/StatsDClientBundle)

This bundle helps you to monitor your application.

It uses [statsd-php-client](https://github.com/liuggio/statsd-php-client) as **Client** for the etsy/Statsd API.

It Includes

- a **Service**, a **Factory** and an Entity callable by the DIC
- a **Monolog Handler**
- a series of **Collectors** in order to aggregate your personal data.
- a series of **Commands** in order to execute data also from cli.

Simple usage!
-------------

[](#simple-usage)

```
$this->get('statsd')
     ->increment('log.error')
     ->gauge('log.rate', 25)
     ->flush();
```

Check out the documentation
---------------------------

[](#check-out-the-documentation)

- [Installation and Usage](https://github.com/liuggio/StatsDClientBundle/blob/master/Resources/doc/installation.md)
- [Advanced usage](https://github.com/liuggio/StatsDClientBundle/blob/master/Resources/doc/advanced.md)

Articles
--------

[](#articles)

- [Article: ServerGrove - Interesting Symfony Bundles: StatsDClientBundle](http://blog.servergrove.com/2012/10/09/interesting-symfony-bundles-statsdclientbundle)
- [Article : Install Stats.d / Graphite on a debian server in order to monitor a Symfony2 application (1/2) ](http://www.elao.com/blog/linux/install-stats-d-graphite-on-a-debian-server-to-monitor-a-symfony2-application-12.html)
- [Article : Monitor your Symfony2 application via Stats.d and Graphite (2/2) ](http://www.elao.com/blog/symfony-2/monitor-your-symfony2-application-via-stats-d-and-graphite-22.html)
- [Slide : Building OpenSky with Symfony2 by Jonathan H. Wage](https://speakerdeck.com/jwage/building-opensky-with-symfony2)

Abstract
--------

[](#abstract)

Monitoring what is happening in your production Symfony2 application, with StatsD and Graphite.

Within this bundle you could use ready-to-go monitor for

- Monolog
- Amount of visitor
- Logged vs Anonymous user
- SQL: Verbs used (amount of select/set/update/upgrade/delete) (this feature is not suggested, please use a server monitor tool eg. nagios, munin)
- Amount of PHP ram used
- You could create your own using the Factory and the Service.

### On dev env the data are not pushed to the socket but to syslog.

[](#on-dev-env-the-data-are-not-pushed-to-the-socket-but-to-syslog)

If debug mode is enabled no packet are sent over the udp socket, and you could see what's going on reading the syslog with `tail -f /var/log/syslog`

```
Mar 19 00:48:11 liuggio nginx: statsd-open
Mar 19 00:48:11 liuggio nginx: statsd-write "tvision.visitor:1|tvision.memory:43520|tvision.user.anonymous:1|tvision.query.start:1|tvision.query.insert:1|c" 118 Bytes
Mar 19 00:48:11 liuggio nginx: statsd-close

```

Note: by default in `dev` environment debug is true.

One UDP packet to rule them all
-------------------------------

[](#one-udp-packet-to-rule-them-all)

With a proper config file, your StatsD server will receive in a single upd packet:

```
prefix.visitor:1|c                  # Increment visitor
prefix.user.anonymous:1|c           # The visitor is not logged

prefix.log.app.error.user_action:1  # Stats by monolog with $this->get('logger')->error('user_action')

prefix.memory:4480|g                # The php memory peak was 4480 MB

prefix.exception.exception.500:1|c  # Exception occurred, the Exception code was 500

prefix.query.insert:1|c             # Query Insert
prefix.query.select:1|c             # Query Select
```

Short Theory and links
----------------------

[](#short-theory-and-links)

### Vagrant StatSD and Graphite

[](#vagrant-statsd-and-graphite)

see this blog post to install [Easy install statsd graphite with vagrant](http://welcometothebundle.com/easily-install-statsd-and-graphite-with-vagrant/).

#### [StatsD](https://github.com/etsy/statsd)

[](#statsd)

StatsD is a simple daemon for easy stats aggregation

#### [Graphite](http://graphite.wikidot.com/)

[](#graphite)

Graphite is a Scalable Realtime Graphing

#### The Client send data with UDP (faster)

[](#the-client-send-data-with-udp-faster)

Contribution
------------

[](#contribution)

See [CONTRIBUTING.md](CONTRIBUTING.md)

Contributors
------------

[](#contributors)

###  Health Score

48

—

FairBetter than 93% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity53

Moderate usage in the ecosystem

Community27

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 74% 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 ~154 days

Recently: every ~578 days

Total

22

Last Release

1795d ago

Major Versions

v1.6.8 → 2.0.x-dev2015-05-13

PHP version history (2 changes)v1.0.0PHP &gt;=5.3.2

v1.8.0PHP ^7.0 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/446a646f719434553ab25f0f931d28ec09fbb036528126ac7e9d54a2e8132581?d=identicon)[liuggio](/maintainers/liuggio)

---

Top Contributors

[![liuggio](https://avatars.githubusercontent.com/u/530406?v=4)](https://github.com/liuggio "liuggio (131 commits)")[![garak](https://avatars.githubusercontent.com/u/179866?v=4)](https://github.com/garak "garak (11 commits)")[![pborreli](https://avatars.githubusercontent.com/u/77759?v=4)](https://github.com/pborreli "pborreli (3 commits)")[![tristanbes](https://avatars.githubusercontent.com/u/346010?v=4)](https://github.com/tristanbes "tristanbes (3 commits)")[![jdeniau](https://avatars.githubusercontent.com/u/1398469?v=4)](https://github.com/jdeniau "jdeniau (3 commits)")[![OskarStark](https://avatars.githubusercontent.com/u/995707?v=4)](https://github.com/OskarStark "OskarStark (3 commits)")[![bryglen](https://avatars.githubusercontent.com/u/875604?v=4)](https://github.com/bryglen "bryglen (3 commits)")[![arendjantetteroo](https://avatars.githubusercontent.com/u/713066?v=4)](https://github.com/arendjantetteroo "arendjantetteroo (2 commits)")[![ClementGautier](https://avatars.githubusercontent.com/u/660091?v=4)](https://github.com/ClementGautier "ClementGautier (2 commits)")[![dav-m85](https://avatars.githubusercontent.com/u/1519726?v=4)](https://github.com/dav-m85 "dav-m85 (2 commits)")[![jfouca](https://avatars.githubusercontent.com/u/1428829?v=4)](https://github.com/jfouca "jfouca (2 commits)")[![jorge07](https://avatars.githubusercontent.com/u/4022187?v=4)](https://github.com/jorge07 "jorge07 (2 commits)")[![pgodel](https://avatars.githubusercontent.com/u/18968?v=4)](https://github.com/pgodel "pgodel (2 commits)")[![maxmilash](https://avatars.githubusercontent.com/u/29126953?v=4)](https://github.com/maxmilash "maxmilash (1 commits)")[![ccMatrix](https://avatars.githubusercontent.com/u/96917?v=4)](https://github.com/ccMatrix "ccMatrix (1 commits)")[![zergu](https://avatars.githubusercontent.com/u/171167?v=4)](https://github.com/zergu "zergu (1 commits)")[![serbancatalin](https://avatars.githubusercontent.com/u/7068224?v=4)](https://github.com/serbancatalin "serbancatalin (1 commits)")[![ShreyaPrabhu](https://avatars.githubusercontent.com/u/16148410?v=4)](https://github.com/ShreyaPrabhu "ShreyaPrabhu (1 commits)")[![sloba88](https://avatars.githubusercontent.com/u/1928305?v=4)](https://github.com/sloba88 "sloba88 (1 commits)")[![bendavies](https://avatars.githubusercontent.com/u/625392?v=4)](https://github.com/bendavies "bendavies (1 commits)")

---

Tags

symfonystatsdmonitorgraphite

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/liuggio-statsd-client-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/liuggio-statsd-client-bundle/health.svg)](https://phpackages.com/packages/liuggio-statsd-client-bundle)
```

###  Alternatives

[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)[socloz/monitoring-bundle

A profiling/monitoring Symfony2 bundle for production servers - alerts on exceptions, logs profiling data &amp; sends data to statsd/graphite

6944.2k](/packages/socloz-monitoring-bundle)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

9410.8k](/packages/ahmed-bhs-doctrine-doctor)[ecotone/symfony-bundle

Ecotone for Symfony — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Symfony Messenger, via PHP attributes.

11249.0k1](/packages/ecotone-symfony-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-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)
