Skip to content

The MetricsPower component allows make your application able to metric

License

Notifications You must be signed in to change notification settings

fractalzombie/frzb-metrics-power

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metrics Power Component

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

About

The MetricsPower component allows make your application able to metric

Resources

License

Stars

Watchers

Forks

Packages

No packages published