forked from Superbalist/laravel-prometheus-exporter
-
Notifications
You must be signed in to change notification settings - Fork 7
/
prometheus.php
104 lines (87 loc) · 2.97 KB
/
prometheus.php
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
<?php
return [
/*
|--------------------------------------------------------------------------
| Namespace
|--------------------------------------------------------------------------
|
| The namespace to use as a prefix for all metrics.
|
| This will typically be the name of your project, eg: 'search'.
|
*/
'namespace' => env('PYR_NAMESPACE', 'app'),
/*
|--------------------------------------------------------------------------
| Metrics Route Enabled?
|--------------------------------------------------------------------------
|
| If enabled, a /metrics route will be registered to export prometheus
| metrics.
|
*/
'metrics_route_enabled' => env('PYR_METRICS_ROUTE_ENABLED', true),
/*
|--------------------------------------------------------------------------
| Metrics Route Path
|--------------------------------------------------------------------------
|
| The path at which prometheus metrics are exported.
|
| This is only applicable if metrics_route_enabled is set to true.
|
*/
'metrics_route_path' => env('PYR_METRICS_ROUTE_PATH', 'metrics'),
/*
|--------------------------------------------------------------------------
| Storage Adapter
|--------------------------------------------------------------------------
|
| The storage adapter to use.
|
| Supported: "memory", "redis", "apc"
|
*/
'storage_adapter' => env('PYR_STORAGE_ADAPTER', 'memory'),
/*
|--------------------------------------------------------------------------
| Storage Adapters
|--------------------------------------------------------------------------
|
| The storage adapter configs.
|
*/
'storage_adapters' => [
'redis' => [
'host' => env('PYR_REDIS_HOST', 'localhost'),
'port' => env('PYR_REDIS_PORT', 6379),
'timeout' => env('PYR_REDIS_TIMEOUT', 0.1),
'read_timeout' => env('PYR_REDIS_READ_TIMEOUT', 10),
'persistent_connections' => env('PYR_REDIS_PERSISTENT_CONNECTIONS', false),
'prefix' => env('PYR_REDIS_PREFIX', 'PYR_'),
],
],
/*
|--------------------------------------------------------------------------
| Collect full SQL query
|--------------------------------------------------------------------------
|
| Indicates whether we should collect the full SQL query or not.
|
*/
'collect_full_sql_query' => env('PYR_COLLECT_FULL_SQL_QUERY', true),
/*
|--------------------------------------------------------------------------
| Collectors
|--------------------------------------------------------------------------
|
| The collectors specified here will be auto-registered in the exporter.
|
*/
'collectors' => [
// \Your\ExporterClass::class,
],
'default_metric_labels' => [
//Set your default env vars labels here
]
];