Skip to content

Commit 2f93e2a

Browse files
ACPT-1584
Adding documentation in README.md files that explain the new options in deployment configuration
1 parent 33ed62a commit 2f93e2a

File tree

3 files changed

+84
-1
lines changed

3 files changed

+84
-1
lines changed

app/code/Magento/ApplicationPerformanceMonitor/Profiler/Output/LoggerOutput.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function doOutput(array $metrics, array $information)
6767
}
6868
$message = \rtrim($message, ",\n");
6969
$message .= sprintf("\n}\n");
70-
$this->logger->error($message); ################# #######
70+
$this->logger->debug($message);
7171
}
7272

7373
/**
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,64 @@
11
**ApplicationPerformanceMonitor**
22

33
Monitors the Performance of the Application
4+
5+
To configure, edit app/etc/env.php
6+
Add these lines.
7+
8+
```
9+
'application' => [
10+
'performance_monitor' => [
11+
'logger_output_enable' => 1,
12+
'logger_output_verbose' => 0,
13+
]
14+
]
15+
```
16+
17+
Use 0 or 1 as the value to enable or disable.
18+
Both `logger_output_enable` and `logger_output_verbose` default to 0.
19+
20+
The option `logger_output_enable` enables outputting performance metrics to the logger using `debug` method of logger.
21+
The option `logger_output_verbose` adds additional metrics.
22+
23+
Example output in log file without verbose:
24+
```
25+
[2023-10-04T20:48:23.727037+00:00] report.ERROR: "Profile information": {
26+
"applicationClass": "Magento\ApplicationServer\App\Application\Interceptor",
27+
"applicationServer": "1",
28+
"threadPreviousRequestCount": "73",
29+
"memoryUsageAfter": "240 MB",
30+
"memoryUsageAfterComparedToPrevious": "0 B",
31+
"memoryUsageDelta": "118 KB",
32+
"peakMemoryUsageAfter": "243 MB",
33+
"peakMemoryUsageDelta": "0 B",
34+
"wallTimeElapsed": "0 s"
35+
}
36+
```
37+
38+
Example output in log file with verbose:
39+
```
40+
[2023-10-04T20:55:31.174304+00:00] report.ERROR: "Profile information": {
41+
"applicationClass": "Magento\ApplicationServer\App\Application\Interceptor",
42+
"applicationServer": "1",
43+
"threadPreviousRequestCount": "42",
44+
"memoryUsageBefore": "239568640 B",
45+
"memoryUsageAfter": "239686808 B",
46+
"memoryUsageAfterComparedToPrevious": "0 B",
47+
"memoryUsageDelta": "118168 B",
48+
"peakMemoryUsageBefore": "243053632 B",
49+
"peakMemoryUsageAfter": "243053632 B",
50+
"peakMemoryUsageDelta": "0 B",
51+
"wallTimeBefore": "2023-10-04T20:55:31.170300",
52+
"wallTimeAfter": "2023-10-04T20:55:31.174200",
53+
"wallTimeElapsed": "0.0038700103759766 s",
54+
"userTimeBefore": "3.771626 s",
55+
"userTimeAfter": "3.771626 s",
56+
"userTimeElapsed": "0 s",
57+
"systemTimeBefore": "0.095585 s",
58+
"systemTimeAfter": "0.099126 s",
59+
"systemTimeElapsed": "0.003541 s"
60+
}
61+
```
62+
63+
The additional options `newrelic_output_enable` and `newrelic_output_verbose` are only used if ApplicationPerformanceMonitorNewRelic module is also installed and enabled.
64+
See README.md in ApplicationPerformanceMonitorNewRelic for more details on that.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
11
**ApplicationPerformanceMonitorNewRelic**
22

33
Monitors the Performance of the Application in New Relic
4+
5+
To use this module, it requires a New Relic account and the environment already by configured to use that account.
6+
For general New Relic PHP configuration information, see https://docs.newrelic.com/docs/apm/agents/php-agent/configuration/php-agent-configuration/ .
7+
8+
To configure this module, edit app/etc/env.php
9+
Add these lines.
10+
11+
```
12+
'application' => [
13+
'performance_monitor' => [
14+
'newrelic_output_enable' => 1,
15+
'newrelic_output_verbose' => 0,
16+
]
17+
]
18+
```
19+
Use 0 or 1 as the value to enable or disable.
20+
`newrelic_output_enable` defaults to 1, and `newrelic_output_verbose` defaults to 0.
21+
22+
The option `newrelic_output_enable` enables outputting performance metrics to New Relic.
23+
The option `newrelic_output_verbose` adds additional metrics
24+
25+
See README.md in ApplicationPerformanceMonitor for details about what metrics are in each.

0 commit comments

Comments
 (0)