https://github.com/nohponex/monolog-datadog-handler/blob/master/src/DataDogHandler.php#L79 calls event(), which is documented as a blocking call:
https://github.com/DataDog/php-datadogstatsd/blob/master/src/DogStatsd.php#L383-L393
While there's code in event() to send over UDP, since we set an API key it's back to TCP: https://github.com/DataDog/php-datadogstatsd/blob/master/src/DogStatsd.php#L88-L90
A few options I see:
- Document that this handler should be wrapped in another handler that batches events and sends them on shutdown / destruct.
- Use BatchedDogStatsd instead of
DogStatsd.
- Use the DogStatsd class, but see if we can send over UDP?
https://github.com/nohponex/monolog-datadog-handler/blob/master/src/DataDogHandler.php#L79 calls
event(), which is documented as a blocking call:https://github.com/DataDog/php-datadogstatsd/blob/master/src/DogStatsd.php#L383-L393
While there's code in
event()to send over UDP, since we set an API key it's back to TCP: https://github.com/DataDog/php-datadogstatsd/blob/master/src/DogStatsd.php#L88-L90A few options I see:
DogStatsd.