Skip to content

Commit

Permalink
Merge pull request #488 from hhxsv5/feature/request-max-time-metric-8.x
Browse files Browse the repository at this point in the history
default max_duration_time_window 60s
  • Loading branch information
hhxsv5 authored Dec 13, 2024
2 parents 1002b3e + ba350f2 commit 895d015
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Components/Prometheus/Collectors/HttpRequestCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ class HttpRequestCollector extends MetricCollector
public function __construct(array $config)
{
parent::__construct($config);

if (!isset($this->config['max_duration_time_window'])) {
$this->config['max_duration_time_window'] = 60;
}

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

0 comments on commit 895d015

Please sign in to comment.