Skip to content

Commit

Permalink
Merge branch 'master' into 3.1
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/support/tests/FunctionTest.php
  • Loading branch information
limingxinleo committed Nov 10, 2023
2 parents a3809a5 + 9d7abda commit 6df2909
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions publish/metric.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
'default' => env('METRIC_DRIVER', 'prometheus'),
'use_standalone_process' => env('METRIC_USE_STANDALONE_PROCESS', true),
'enable_default_metric' => env('METRIC_ENABLE_DEFAULT_METRIC', true),
'enable_command_metric' => env('METRIC_ENABLE_COMMAND_METRIC', true),
'default_metric_interval' => env('DEFAULT_METRIC_INTERVAL', 5),
// only available when use_standalone_process is true
'buffer_interval' => env('METRIC_BUFFER_INTERVAL', 5),
Expand Down
4 changes: 4 additions & 0 deletions src/Listener/OnBeforeHandle.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ public function process(object $event): void
return;
}

if (! $this->config->get('metric.enable_command_metric', true)) {
return;
}

MetricFactoryPicker::$isCommand = true;

if ($this->config->get('metric.use_standalone_process', true)) {
Expand Down

0 comments on commit 6df2909

Please sign in to comment.