This repository was archived by the owner on Oct 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 210
Expand file tree
/
Copy pathRegistryInterface.php
More file actions
106 lines (94 loc) · 3.1 KB
/
RegistryInterface.php
File metadata and controls
106 lines (94 loc) · 3.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php
namespace Prometheus;
use Prometheus\Exception\MetricNotFoundException;
use Prometheus\Exception\MetricsRegistrationException;
interface RegistryInterface
{
/**
* @return MetricFamilySamples[]
*/
public function getMetricFamilySamples();
/**
* @param string $namespace e.g. cms
* @param string $name e.g. duration_seconds
* @param string $help e.g. The duration something took in seconds.
* @param array $labels e.g. ['controller', 'action']
*
* @return Gauge
* @throws MetricsRegistrationException
*/
public function registerGauge($namespace, $name, $help, $labels = []);
/**
* @param string $namespace
* @param string $name
*
* @return Gauge
* @throws MetricNotFoundException
*/
public function getGauge($namespace, $name);
/**
* @param string $namespace e.g. cms
* @param string $name e.g. duration_seconds
* @param string $help e.g. The duration something took in seconds.
* @param array $labels e.g. ['controller', 'action']
*
* @return Gauge
*/
public function getOrRegisterGauge($namespace, $name, $help, $labels = []);
/**
* @param string $namespace e.g. cms
* @param string $name e.g. requests
* @param string $help e.g. The number of requests made.
* @param array $labels e.g. ['controller', 'action']
*
* @return Counter
* @throws MetricsRegistrationException
*/
public function registerCounter($namespace, $name, $help, $labels = []);
/**
* @param string $namespace
* @param string $name
*
* @return Counter
* @throws MetricNotFoundException
*/
public function getCounter($namespace, $name);
/**
* @param string $namespace e.g. cms
* @param string $name e.g. requests
* @param string $help e.g. The number of requests made.
* @param array $labels e.g. ['controller', 'action']
*
* @return Counter
*/
public function getOrRegisterCounter($namespace, $name, $help, $labels = []);
/**
* @param string $namespace e.g. cms
* @param string $name e.g. duration_seconds
* @param string $help e.g. A histogram of the duration in seconds.
* @param array $labels e.g. ['controller', 'action']
* @param array $buckets e.g. [100, 200, 300]
*
* @return Histogram
* @throws MetricsRegistrationException
*/
public function registerHistogram($namespace, $name, $help, $labels = [], $buckets = null);
/**
* @param string $namespace
* @param string $name
*
* @return Histogram
* @throws MetricNotFoundException
*/
public function getHistogram($namespace, $name);
/**
* @param string $namespace e.g. cms
* @param string $name e.g. duration_seconds
* @param string $help e.g. A histogram of the duration in seconds.
* @param array $labels e.g. ['controller', 'action']
* @param array $buckets e.g. [100, 200, 300]
*
* @return Histogram
*/
public function getOrRegisterHistogram($namespace, $name, $help, $labels = [], $buckets = null);
}