1
+ <?php
2
+
3
+ return [
4
+ /*
5
+ |--------------------------------------------------------------------------
6
+ | Namespace
7
+ |--------------------------------------------------------------------------
8
+ |
9
+ | The namespace to use as a prefix for all metrics.
10
+ |
11
+ | This will typically be the name of your project, eg: 'search'.
12
+ |
13
+ */
14
+
15
+ 'namespace ' => env ('PROMETHEUS_NAMESPACE ' , 'app ' ),
16
+
17
+ /*
18
+ |--------------------------------------------------------------------------
19
+ | Metrics Route Enabled?
20
+ |--------------------------------------------------------------------------
21
+ |
22
+ | If enabled, a /metrics route will be registered to export prometheus
23
+ | metrics.
24
+ |
25
+ */
26
+
27
+ 'metrics_route_enabled ' => env ('PROMETHEUS_METRICS_ROUTE_ENABLED ' , true ),
28
+
29
+ /*
30
+ |--------------------------------------------------------------------------
31
+ | Metrics Route Path
32
+ |--------------------------------------------------------------------------
33
+ |
34
+ | The path at which prometheus metrics are exported.
35
+ |
36
+ | This is only applicable if metrics_route_enabled is set to true.
37
+ |
38
+ */
39
+
40
+ 'metrics_route_path ' => env ('PROMETHEUS_METRICS_ROUTE_PATH ' , 'metrics ' ),
41
+
42
+ /*
43
+ |--------------------------------------------------------------------------
44
+ | Metrics Route Name
45
+ |--------------------------------------------------------------------------
46
+ |
47
+ | Route Parh name aliase.
48
+ |
49
+ | This is only applicable if metrics_route_enabled is set to true.
50
+ |
51
+ */
52
+
53
+ 'metrics_route_name ' => env ('PROMETHEUS_METRICS_ROUTE_NAME ' , 'metrics ' ),
54
+
55
+ /*
56
+ |--------------------------------------------------------------------------
57
+ | Metrics Route Middleware
58
+ |--------------------------------------------------------------------------
59
+ |
60
+ | The middleware to assign to the metrics route.
61
+ |
62
+ | This can be used to protect the /metrics end-point to authenticated users,
63
+ | a specific ip address, etc.
64
+ | You are responsible for writing the middleware and implementing any
65
+ | business logic needed by your application.
66
+ |
67
+ */
68
+
69
+ 'metrics_route_middleware ' => env ('PROMETHEUS_METRICS_ROUTE_MIDDLEWARE ' ),
70
+
71
+ /*
72
+ |--------------------------------------------------------------------------
73
+ | Storage Adapter
74
+ |--------------------------------------------------------------------------
75
+ |
76
+ | The storage adapter to use.
77
+ |
78
+ | Supported: "memory", "redis", "apc"
79
+ |
80
+ */
81
+
82
+ 'storage_adapter ' => env ('PROMETHEUS_STORAGE_ADAPTER ' , 'memory ' ),
83
+
84
+ /*
85
+ |--------------------------------------------------------------------------
86
+ | Storage Adapters
87
+ |--------------------------------------------------------------------------
88
+ |
89
+ | The storage adapter configs.
90
+ |
91
+ */
92
+
93
+ 'storage_adapters ' => [
94
+
95
+ 'redis ' => [
96
+ 'host ' => env ('REDIS_HOST ' , 'localhost ' ),
97
+ 'port ' => env ('REDIS_PORT ' , 6379 ),
98
+ 'password ' => env ('REDIS_PASSWORD ' , null ),
99
+ 'timeout ' => 0.1 ,
100
+ 'read_timeout ' => 10 ,
101
+ 'persistent_connections ' => false ,
102
+ 'prefix ' => env ('PROMETHEUS_REDIS_PREFIX ' , 'PROMETHEUS_ ' ),
103
+ ],
104
+
105
+ ],
106
+
107
+ /*
108
+ |--------------------------------------------------------------------------
109
+ | Collectors
110
+ |--------------------------------------------------------------------------
111
+ |
112
+ | The collectors specified here will be auto-registered in the exporter.
113
+ |
114
+ */
115
+
116
+ 'collectors ' => [
117
+ // \Your\ExporterClass::class,
118
+ ],
119
+
120
+ ];
0 commit comments