forked from pointcloudtechnology/laravel-prometheus-exporter
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCollectorInterface.php
More file actions
34 lines (30 loc) · 853 Bytes
/
Copy pathCollectorInterface.php
File metadata and controls
34 lines (30 loc) · 853 Bytes
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
<?php
namespace Superbalist\LaravelPrometheusExporter;
interface CollectorInterface
{
/**
* Return the name of the collector.
*
* @return string
*/
public function getName();
/**
* Register all metrics associated with the collector.
*
* The metrics needs to be registered on the exporter object.
* eg:
* ```php
* $exporter->registerCounter('search_requests_total', 'The total number of search requests.');
* ```
*
* @param PrometheusExporter $exporter
*/
public function registerMetrics(PrometheusExporter $exporter);
/**
* Collect metrics data, if need be, before exporting.
*
* As an example, this may be used to perform time consuming database queries and set the value of a counter
* or gauge.
*/
public function collect();
}