<?php

declare(strict_types=1);

namespace App\Framework\Metrics;

/**
 * Metric types as defined by Prometheus/OpenMetrics standards
 */
enum MetricType: string
{
    case COUNTER = 'counter';
    case GAUGE = 'gauge';
    case HISTOGRAM = 'histogram';
    case SUMMARY = 'summary';

    public function getDescription(): string
    {
        return match($this) {
            self::COUNTER => 'A cumulative metric that only increases',
            self::GAUGE => 'A metric that can go up and down',
            self::HISTOGRAM => 'A metric that samples observations and counts them in buckets',
            self::SUMMARY => 'A metric that samples observations and provides quantiles',
        };
    }
}
