PluginProbe
DecaLog / 4.4.0
DecaLog v4.4.0
3.0.2 3.1.0 3.10.0 3.2.0 3.3.0 3.4.0 3.4.1 3.5.0 3.5.1 3.6.0 3.6.1 3.6.2 3.6.3 3.7.0 3.7.1 3.8.0 3.9.0 3.9.1 4.0.0 4.1.0 4.2.0 4.3.0 4.3.1 4.4.0 4.5.0 All 75 releases
decalog / includes / libraries / prometheus / RegistryInterface.php

RegistryInterface.php in DecaLog 4.4.0, at includes/libraries/prometheus/RegistryInterface.php

116 lines 3.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Prometheus;
4
5 use Prometheus\Exception\MetricNotFoundException;
6 use Prometheus\Exception\MetricsRegistrationException;
7
8 interface RegistryInterface
9 {
10 /**
11 * @return MetricFamilySamples[]
12 */
13 public function getMetricFamilySamples(): array;
14
15 /**
16 * @param string $namespace e.g. cms
17 * @param string $name e.g. duration_seconds
18 * @param string $help e.g. The duration something took in seconds.
19 * @param string[] $labels e.g. ['controller', 'action']
20 *
21 * @return Gauge
22 * @throws MetricsRegistrationException
23 */
24 public function registerGauge(string $namespace, string $name, string $help, array $labels = []): Gauge;
25
26 /**
27 * @param string $namespace
28 * @param string $name
29 *
30 * @return Gauge
31 * @throws MetricNotFoundException
32 */
33 public function getGauge(string $namespace, string $name): Gauge;
34
35 /**
36 * @param string $namespace e.g. cms
37 * @param string $name e.g. duration_seconds
38 * @param string $help e.g. The duration something took in seconds.
39 * @param string[] $labels e.g. ['controller', 'action']
40 *
41 * @return Gauge
42 * @throws MetricsRegistrationException
43 */
44 public function getOrRegisterGauge(string $namespace, string $name, string $help, array $labels = []): Gauge;
45
46 /**
47 * @param string $namespace e.g. cms
48 * @param string $name e.g. requests
49 * @param string $help e.g. The number of requests made.
50 * @param string[] $labels e.g. ['controller', 'action']
51 *
52 * @return Counter
53 * @throws MetricsRegistrationException
54 */
55 public function registerCounter(string $namespace, string $name, string $help, array $labels = []): Counter;
56
57 /**
58 * @param string $namespace
59 * @param string $name
60 *
61 * @return Counter
62 * @throws MetricNotFoundException
63 */
64 public function getCounter(string $namespace, string $name): Counter;
65
66 /**
67 * @param string $namespace e.g. cms
68 * @param string $name e.g. requests
69 * @param string $help e.g. The number of requests made.
70 * @param string[] $labels e.g. ['controller', 'action']
71 *
72 * @return Counter
73 * @throws MetricsRegistrationException
74 */
75 public function getOrRegisterCounter(string $namespace, string $name, string $help, array $labels = []): Counter;
76
77 /**
78 * @param string $namespace e.g. cms
79 * @param string $name e.g. duration_seconds
80 * @param string $help e.g. A histogram of the duration in seconds.
81 * @param string[] $labels e.g. ['controller', 'action']
82 * @param float[] $buckets e.g. [100, 200, 300]
83 *
84 * @return Histogram
85 * @throws MetricsRegistrationException
86 */
87 public function registerHistogram(
88 string $namespace,
89 string $name,
90 string $help,
91 array $labels = [],
92 array $buckets = null
93 ): Histogram;
94
95 /**
96 * @param string $namespace
97 * @param string $name
98 *
99 * @return Histogram
100 * @throws MetricNotFoundException
101 */
102 public function getHistogram(string $namespace, string $name): Histogram;
103
104 /**
105 * @param string $namespace e.g. cms
106 * @param string $name e.g. duration_seconds
107 * @param string $help e.g. A histogram of the duration in seconds.
108 * @param string[] $labels e.g. ['controller', 'action']
109 * @param float[] $buckets e.g. [100, 200, 300]
110 *
111 * @return Histogram
112 * @throws MetricsRegistrationException
113 */
114 public function getOrRegisterHistogram(string $namespace, string $name, string $help, array $labels = [], array $buckets = null): Histogram;
115 }
116