frzb/metrics-power 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

frzb/metrics-power

最新稳定版本:v1.1.5

Composer 安装命令:

composer require frzb/metrics-power

包简介

The MetricsPower component allows make your application able to metric

README 文档

README

Workflow Build Status Coverage Status Quality Gate Status Scrutinizer Code Quality Build Status Code Intelligence Status

The Metrics Power Component allows make your application able to metric

Installation

The recommended way to install is through Composer:

composer require frzb/metrics-power

It requires PHP version 8.1 and higher.

Usage of #[Metrical]

#[Metrical] will automatically create and collect metrics for your messages

Example

<?php

use FRZB\Component\MetricsPower\Attribute\Metrical;
use FRZB\Component\MetricsPower\Attribute\PrometheusOptions;

#[Metrical(
    new PrometheusOptions(
        'some_topic',
        'CreateUserMessage',
        'Total of user messages',
        ['label'],
        ['total']
    ),
)]
final class CreateUserMessage {
    public function __construct(
        public readonly string $id,
        public readonly string $name,
    ) {}
}

Resources

Alt

统计信息

  • 总下载量: 121
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-03-25