utopia-php/telemetry
最新稳定版本:0.2.0
Composer 安装命令:
composer require utopia-php/telemetry
包简介
关键字:
README 文档
README
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.
Although this library is part of the Utopia System project it is dependency free and can be used as standalone with any other PHP project or framework.
Getting Started
Install using composer:
composer require utopia-php/telemetry
Init in your application:
<?php require_once __DIR__ . '/vendor/autoload.php'; // Create a Telemetry instance using OpenTelemetry adapter. use Utopia\Telemetry\Adapter\OpenTelemetry; $telemetry = new OpenTelemetry('http://localhost:4138', 'namespace', 'app', 'unique-instance-name'); $counter = $telemetry->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
统计信息
- 总下载量: 89.2k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 9
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-13