An open API service indexing awesome lists of open source software.

https://github.com/utopia-php/telemetry

Lite & fast micro PHP telemetry library that is **easy to use**.
https://github.com/utopia-php/telemetry

Last synced: about 2 months ago
JSON representation

Lite & fast micro PHP telemetry library that is **easy to use**.

Awesome Lists containing this project

README

        

# Utopia Telemetry

![Total Downloads](https://img.shields.io/packagist/dt/utopia-php/telemetry.svg)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord)](https://appwrite.io/discord)

Utopia Telemetry is a powerful Telemtry library. This library is aiming to be as simple and easy to learn and use. This library is maintained by the [Appwrite team](https://appwrite.io).

Although this library is part of the [Utopia System](https://github.com/utopia-php) project it is dependency free and can be used as standalone with any other PHP project or framework.

## Getting Started

Install using composer:

```bash
composer require utopia-php/telemetry
```

Init in your application:

```php
createUpDownCounter('http.server.active_requests', '{request}');

$counter->add(1);
$counter->add(2);

// Periodically collect metrics and send them to the configured OpenTelemetry endpoint.
$telemetry->collect();

// Example using Swoole
\Swoole\Timer::tick(60_000, fn () => $telemetry->collect());
```

## System Requirements

Utopia Framework requires PHP 8.0 or later. We recommend using the latest PHP version whenever possible.

## Copyright and license

The MIT License (MIT) [http://www.opensource.org/licenses/mit-license.php](http://www.opensource.org/licenses/mit-license.php)