talentrydev/monitoring-bundle

Symfony bundle integrating talentrydev/monitoring library

5.0.0 2023-06-16 08:08 UTC

This package is auto-updated.

Last update: 2024-05-16 10:00:11 UTC


README

This is a Symfony bundle used for integrating talentrydev/monitoring library into a Symfony project.

Installing

  • Run:
composer require talentrydev/monitoring-bundle
  • Add the MonitoringBundle to your kernel's registerBundles method:
return [
    //...
    new \Talentry\MonitoringBundle\MonitoringBundle();
];

Configuring

The bundle exposes the following configuration options:

OptionTypeDefault valueDescription
enabledbooleantrueSet to false to disable monitoring bundle
namespacestringProductionNamespace for publishing metrics
statsdProtocolstringstandardStatsD protocol (see below for more details)
statsdHoststringlocalhostStatsD server host
statsdPortinteger8125StatsD server port
queuestringnullQueueing strategy to use (see below for more details)
redisHoststringlocalhostHost of the redis instance
redisPortinteger6379Port of the redis instance
  • statsdProtocol may be either datadog (for datadog extension of StatsD protocol) or standard (for standard StatsD protocol)
  • queue may be either redis, memory or null (default). By setting this value to redis or memory the metrics will be queued using the selected strategy and will only be published once the ty:monitoring:push-queued-metrics command has been executed.

Example configuration

  • To configure the bundle to use the standard StatsD protocol, with StatsD agent listening on 10.10.10.10, port 8125:
monitoring:
  statsdHost: 10.10.10.10
  • To configure the bundle to use the redis queue, add the following to config.yml:
monitoring:
  queue: redis