forked from arquivei/laravel-prometheus-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prometheus.php
116 lines (98 loc) · 3.51 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
105
106
107
108
109
110
111
112
113
114
115
116
<?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('PROMETHEUS_NAMESPACE', 'app'),
/*
|--------------------------------------------------------------------------
| Metrics Route Enabled?
|--------------------------------------------------------------------------
|
| If enabled, a /metrics route will be registered to export prometheus
| metrics.
|
*/
'metrics_route_enabled' => env('PROMETHEUS_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('PROMETHEUS_METRICS_ROUTE_PATH', 'metrics'),
/*
|--------------------------------------------------------------------------
| Storage Adapter
|--------------------------------------------------------------------------
|
| The storage adapter to use.
|
| Supported: "memory", "redis", "apc"
|
*/
'storage_adapter' => env('PROMETHEUS_STORAGE_ADAPTER', 'memory'),
/*
|--------------------------------------------------------------------------
| Storage Adapters
|--------------------------------------------------------------------------
|
| The storage adapter configs.
|
*/
'storage_adapters' => [
'redis' => [
'host' => env('PROMETHEUS_REDIS_HOST', 'localhost'),
'port' => env('PROMETHEUS_REDIS_PORT', 6379),
'database' => env('PROMETHEUS_REDIS_DATABASE', 0),
'timeout' => env('PROMETHEUS_REDIS_TIMEOUT', 0.1),
'read_timeout' => env('PROMETHEUS_REDIS_READ_TIMEOUT', 10),
'persistent_connections' => env('PROMETHEUS_REDIS_PERSISTENT_CONNECTIONS', false),
'prefix' => env('PROMETHEUS_REDIS_PREFIX', 'PROMETHEUS_'),
],
],
/*
|--------------------------------------------------------------------------
| Collect full SQL query
|--------------------------------------------------------------------------
|
| Indicates whether we should collect the full SQL query or not.
|
*/
'collect_full_sql_query' => env('PROMETHEUS_COLLECT_FULL_SQL_QUERY', false),
/*
|--------------------------------------------------------------------------
| Collectors
|--------------------------------------------------------------------------
|
| The collectors specified here will be auto-registered in the exporter.
|
*/
'collectors' => [
// \Your\ExporterClass::class,
],
/*
|--------------------------------------------------------------------------
| Buckets config
|--------------------------------------------------------------------------
|
| The buckets config specified here will be passed to the histogram generator
| in the prometheus client. You can configure it as an array of time bounds.
| Default value is null.
|
*/
'routes_buckets' => null,
'sql_buckets' => null,
'guzzle_buckets' => null,
];