Skip to content

Commit 895d015

Browse files
authored
Merge pull request #488 from hhxsv5/feature/request-max-time-metric-8.x
default max_duration_time_window 60s
2 parents 1002b3e + ba350f2 commit 895d015

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Components/Prometheus/Collectors/HttpRequestCollector.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ class HttpRequestCollector extends MetricCollector
1616
public function __construct(array $config)
1717
{
1818
parent::__construct($config);
19+
20+
if (!isset($this->config['max_duration_time_window'])) {
21+
$this->config['max_duration_time_window'] = 60;
22+
}
1923

2024
$routes = method_exists(app(), 'getRoutes') ? app()->getRoutes() : app('router')->getRoutes();
2125
if ($routes instanceof \Illuminate\Routing\RouteCollection) { // Laravel

0 commit comments

Comments
 (0)