PHPackages                             yoursurprisecom/monolog-dd-udp-handler - 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. yoursurprisecom/monolog-dd-udp-handler

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

yoursurprisecom/monolog-dd-udp-handler
======================================

Monolog Datadog UDP Handler

v1.6.6(1y ago)146.3k—5.3%MITPHPPHP ^8.2CI passing

Since Jun 30Pushed 6mo ago4 watchersCompare

[ Source](https://github.com/YourSurpriseCom/monolog-dd-udp-handler)[ Packagist](https://packagist.org/packages/yoursurprisecom/monolog-dd-udp-handler)[ Docs](https://github.com/YourSurpriseCom/monolog-dd-udp-handler)[ RSS](/packages/yoursurprisecom-monolog-dd-udp-handler/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (21)Used By (0)

Monolog Datadog UDP Handler
===========================

[](#monolog-datadog-udp-handler)

[![workflow](https://github.com/YourSurpriseCom/monolog-dd-udp-handler/actions/workflows/ci.yml/badge.svg)](https://github.com/YourSurpriseCom/monolog-dd-udp-handler/actions/workflows/ci.yml/badge.svg)[![Minimum PHP Version](https://camo.githubusercontent.com/3cb57ed5845cb7206e0690d14bc2aa6c04f8f9d91bcaea0b8ef13dafe1d1685f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f796f75727375727072697365636f6d2f6d6f6e6f6c6f672d64642d7564702d68616e646c65722e7376673f6d61784167653d33363030)](https://packagist.org/packages/yoursurprisecom/monolog-dd-udp-handler)[![phpstan](https://camo.githubusercontent.com/60d889ef0c9d7eb40a1326e7441174efd581a6a6fe4872cf3585fc80c73cb869/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c2532304d61782d627269676874677265656e2e737667)](https://camo.githubusercontent.com/60d889ef0c9d7eb40a1326e7441174efd581a6a6fe4872cf3585fc80c73cb869/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c2532304d61782d627269676874677265656e2e737667)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)

Overview
--------

[](#overview)

This [Monolog](https://github.com/Seldaek/monolog) handler will send the messages to the [dd-log-proxy](https://github.com/YourSurpriseCom/dd-log-proxy) over UDP and the `dd-log-proxy` will send the messages over TCP to the Datadog API.

Datadog Log Proxy
-----------------

[](#datadog-log-proxy)

This handler is build to use in conjunction with the [Datadog Log Proxy](https://github.com/YourSurpriseCom/dd-log-proxy) written in go. The proxy can be run as a container next to you application as a sidecar or as a standalone service.

### One proxy for all applications

[](#one-proxy-for-all-applications)

As this handler gather the information from the current trace, only one proxy is needed for all your applications. The logs will be connected to the correct trace and service.

Usage
-----

[](#usage)

Install the package using composer: `composer require yoursurprisecom/monolog-dd-udp-handler`

Simply create the handler with the proxy hostname and port, and push the handler into monolog:

```
