PHPackages                             slick/telemetry - 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. slick/telemetry

ActiveLibrary

slick/telemetry
===============

A small library that uses a PSR-3 compliant logger to send HTTP/Application telemetry metrics to a given log service/system

v1.1.0(4y ago)0161MITPHPPHP &gt;=8

Since Feb 1Pushed 4y ago1 watchersCompare

[ Source](https://github.com/slickframework/telemetry)[ Packagist](https://packagist.org/packages/slick/telemetry)[ Docs](https://github.com/slickframework/telemetry)[ RSS](/packages/slick-telemetry/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (7)Versions (9)Used By (0)

Slick JSON API implementation package
=====================================

[](#slick-json-api-implementation-package)

[![GitHub release (latest SemVer)](https://camo.githubusercontent.com/2e919c256eca7f7e93189f13de6e02356beac43ee0f578f4907a231b8f24858c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f736c69636b6672616d65776f726b2f74656c656d657472793f7374796c653d666c61742d737175617265)](https://github.com/slickframework/telemetry/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![GitHub Workflow Status](https://camo.githubusercontent.com/ff9bae4e2ed5a7900a9fc0f5020b1b7bdfd60a1aedd8f19537e25d717f7d41e5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f736c69636b6672616d65776f726b2f74656c656d657472792f436f6e74696e756f7573253230496e746567726174696f6e3f7374796c653d666c61742d737175617265)](https://github.com/slickframework/telemetry/actions)[![Quality Score](https://camo.githubusercontent.com/cbc019c36b039bdf9dfb58f784e06a5e2ec5fad72d8ef0784454033883615a9f/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f736c69636b6672616d65776f726b2f74656c656d657472792f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/slickframework/telemetry?branch=master)[![Total Downloads](https://camo.githubusercontent.com/395afcae3e259224afcd6d3ff494595d56922f548197c4e099c3a3b249627ee9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736c69636b2f74656c656d657472792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/slick/telemetry)

`slick/telemetry` is a small library that uses a PSR-3 compliant logger to send HTTP/Application telemetry metrics to a given log service/system. It abstracts the concepts of a *metric*, *dependency*, *exception*, PSR-14 slick implementation of an *event* and HTTP *requests*. It also implements [PSR-3](https://www.php-fig.org/psr/psr-3)`LoggerInterface` allowing its usage as a regular logger.

This package is compliant with PSR-12 code standards and PSR-4 autoload standards. It also applies the [semantic version 2.0.0](http://semver.org) specification.

Install
-------

[](#install)

Via Composer

```
$ composer require slick/telemetry
```

If you need to use `slick/telemetry` with version 7.4.x of PHP please do de following

```
$ composer require slick/telemetry:^1.0
```

Usage
-----

[](#usage)

To start using the telemetry logger you will need a [PSR-3](https://www.php-fig.org/psr/psr-3) implementation that will deliver the information to your preferred log system.
We recommend `monolog\monolog` package, developed by [Jordi Boggiano](https://github.com/Seldaek) with one of its [handlers](https://github.com/Seldaek/monolog/blob/main/doc/02-handlers-formatters-processors.md). Please visit [Monolog](https://github.com/Seldaek/monolog) project site on [GitHub](https://github.com/Seldaek/monolog) for more information.

To add `monolog\monolog` to you project run the following:

```
$ composer require monolog\monolog
```

#### Create a telemetry client

[](#create-a-telemetry-client)

With a [PSR-3](https://www.php-fig.org/psr/psr-3) logger we are now ready to create our client:

```
