You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/14-reference/01-components/03-taosadapter.md
+319-5Lines changed: 319 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -734,24 +734,32 @@ The log can be configured with the following parameters:
734
734
735
735
Whether to record SQL to CSV files(Default: `false`).For details, see [Recording SQL to CSV Files](#recording-sql-to-csv-files).
736
736
737
+
- **`log.enableStmtToCsvLogging`**
738
+
739
+
Whether to record STMT to CSV files(Default: `false`).For details, see [Recording STMT to CSV Files](#recording-stmt-to-csv-files).
740
+
737
741
- **`log.enableRecordHttpSql`**
738
742
739
-
**It is not recommended to continue using this parameter. We suggest using [Recording SQL to CSV Files](#recording-sql-to-csv-files) as the alternative solution.**
743
+
**This parameter is deprecated; use [Recording SQL to CSV Files](#recording-sql-to-csv-files) instead.**
744
+
740
745
Whether to record HTTP SQL requests (Default: `false`).
741
746
742
747
- **`log.sqlRotationCount`**
743
748
744
-
**It is not recommended to continue using this parameter. We suggest using [Recording SQL to CSV Files](#recording-sql-to-csv-files) as the alternative solution.**
749
+
**This parameter is deprecated; use [Recording SQL to CSV Files](#recording-sql-to-csv-files) instead.**
750
+
745
751
Number of SQL log files to rotate (Default: `2`).
746
752
747
753
- **`log.sqlRotationSize`**
748
754
749
-
**It is not recommended to continue using this parameter. We suggest using [Recording SQL to CSV Files](#recording-sql-to-csv-files) as the alternative solution.**
755
+
**This parameter is deprecated; use [Recording SQL to CSV Files](#recording-sql-to-csv-files) instead.**
756
+
750
757
Maximum size of a single SQL log file (Supports KB/MB/GB units, Default: `"1GB"`).
751
758
752
759
- **`log.sqlRotationTime`**
753
760
754
-
**It is not recommended to continue using this parameter. We suggest using [Recording SQL to CSV Files](#recording-sql-to-csv-files) as the alternative solution.**
761
+
**This parameter is deprecated; use [Recording SQL to CSV Files](#recording-sql-to-csv-files) instead.**
762
+
755
763
SQL log rotation interval (Default: `24h`).
756
764
757
765
You can set the taosAdapter log output detail level by setting the --log.level parameter or the environment variable TAOS_ADAPTER_LOG_LEVEL. Valid values include: panic, fatal, error, warn, warning, info, debug, and trace.
@@ -1222,6 +1230,7 @@ Configuration Parameters and their corresponding environment variables:
taosAdapter supports recording STMT requests to CSV files starting from version v3.4.0.1. Users can enable this feature through the configuration parameter `log.enableStmtToCsvLogging` or dynamically enable/disable it via HTTP requests.
1553
+
1554
+
:::warning
1555
+
Enabling this feature leads to severe performance degradation.
1556
+
:::
1557
+
1558
+
### Configuration Parameters
1559
+
1560
+
1. New configuration item `log.enableStmtToCsvLogging` (boolean, default: false) determines whether STMT logging is enabled.
1561
+
When set to true, STMT records will be saved to CSV files.
1562
+
The recording start time is the service startup time, and the end time is `2300-01-01 00:00:00`.
1563
+
1564
+
2. File naming follows the same rules as logs: `taosadapterStmt_{instanceId}_{yyyyMMdd}.csv[.index]`
1565
+
- `instanceId`: taosAdapter instance ID, configurable via the instanceId parameter.
1566
+
- `yyyyMMdd`: Date in year-month-day format.
1567
+
- `index`: If multiple files exist, a numeric suffix will be appended to the filename.
1568
+
1569
+
3. Existing log parameters are used for space retention, file splitting, and storage path:
1570
+
- `log.path`: Storage path
1571
+
- `log.keepDays`: Retention period in days
1572
+
- `log.rotationCount`: Maximum number of retained files
1573
+
- `log.rotationSize`: Maximum size per file
1574
+
- `log.compress`: Whether compression is enabled
1575
+
- `log.reservedDiskSize`: Reserved disk space size
1576
+
1577
+
### Dynamic Enablement
1578
+
1579
+
Send an HTTP POST request to the `/record_stmt` endpoint to dynamically enable recording. Authentication is the same as for `/rest/sql`. Example:
1580
+
1581
+
```bash
1582
+
curl --location --request POST 'http://127.0.0.1:6041/record_stmt' \
Currently, taosAdapter only collects monitoring indicators for RESTful/WebSocket related requests. There are no monitoring indicators for other interfaces.
0 commit comments