Skip to content

Commit 4597ecd

Browse files
committed
Add box.cfg settings: flight recorder
1 parent 4cd1251 commit 4597ecd

File tree

2 files changed

+144
-0
lines changed

2 files changed

+144
-0
lines changed
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
.. _cfg_flight_recorder:
2+
3+
.. admonition:: Enterprise Edition
4+
:class: fact
5+
6+
The flight recorder is available in the `Enterprise Edition <https://www.tarantool.io/compare/>`_ only.
7+
8+
* :ref:`flightrec_enabled <cfg_flightrec_enabled>`
9+
* :ref:`flightrec_logs_size <cfg_flightrec_logs_size>`
10+
* :ref:`flightrec_logs_max_msg_size <cfg_flightrec_logs_max_msg_size>`
11+
* :ref:`flightrec_logs_log_level <cfg_flightrec_logs_log_level>`
12+
* :ref:`flightrec_metrics_period <cfg_flightrec_metrics_period>`
13+
* :ref:`flightrec_metrics_interval <cfg_flightrec_metrics_interval>`
14+
* :ref:`flightrec_requests_size <cfg_flightrec_requests_size>`
15+
* :ref:`flightrec_requests_max_req_size <cfg_flightrec_requests_max_req_size>`
16+
* :ref:`flightrec_requests_max_res_size <cfg_flightrec_requests_max_res_size>`
17+
18+
19+
.. _cfg_flightrec_enabled:
20+
21+
.. confval:: flightrec_enabled
22+
23+
Enable the :ref:`flight recorder <enterprise-flight-recorder>`.
24+
25+
| Type: boolean
26+
| Default: false
27+
| Environment variable: TT_FLIGHTREC_ENABLED
28+
| Dynamic: yes
29+
30+
31+
.. _cfg_flightrec_logs_size:
32+
33+
.. confval:: flightrec_logs_size
34+
35+
Specifies the size (in bytes) of the log storage.
36+
You can set this option to ``0`` to disable the log storage.
37+
38+
| Type: integer
39+
| Default: 10485760
40+
| Environment variable: TT_FLIGHTREC_LOGS_SIZE
41+
42+
43+
.. _cfg_flightrec_logs_max_msg_size:
44+
45+
.. confval:: flightrec_logs_max_msg_size
46+
47+
Specifies the maximum size (in bytes) of the log message.
48+
The log message is truncated if its size exceeds this limit.
49+
50+
| Type: integer
51+
| Default: 4096
52+
| Maximum: 16384
53+
| Environment variable: TT_FLIGHTREC_LOGS_MAX_MSG_SIZE
54+
55+
56+
.. _cfg_flightrec_logs_log_level:
57+
58+
.. confval:: flightrec_logs_log_level
59+
60+
Specifies the level of detail the log has.
61+
You can learn more about log levels from the :ref:`log_level <cfg_logging-log_level>`
62+
option description.
63+
Note that the ``flightrec_logs_log_level`` value might differ from ``log_level``.
64+
65+
| Type: integer
66+
| Default: 6
67+
| Environment variable: TT_FLIGHTREC_LOGS_LOG_LEVEL
68+
69+
70+
.. _cfg_flightrec_metrics_period:
71+
72+
.. confval:: flightrec_metrics_period
73+
74+
Specifies the time period (in seconds) that defines how long metrics are stored from the moment of dump.
75+
So, this value defines how much historical metrics data is collected up to the moment of crash.
76+
The frequency of metric dumps is defined by :ref:`flightrec_metrics_interval <cfg_flightrec_metrics_interval>`.
77+
78+
| Type: integer
79+
| Default: 180
80+
| Environment variable: TT_FLIGHTREC_METRICS_PERIOD
81+
82+
83+
.. _cfg_flightrec_metrics_interval:
84+
85+
.. confval:: flightrec_metrics_interval
86+
87+
Specifies the time interval (in seconds) that defines the frequency of dumping metrics.
88+
This value shouldn't exceed :ref:`flightrec_metrics_period <cfg_flightrec_metrics_period>`.
89+
90+
.. NOTE::
91+
92+
Given that the average size of a metrics entry is 2 kB,
93+
you can estimate the size of the metrics storage as follows:
94+
95+
.. code-block:: console
96+
97+
(flightrec_metrics_period / flightrec_metrics_interval) * 2 kB
98+
99+
| Type: number
100+
| Default: 1.0
101+
| Minimum: 0.001
102+
| Environment variable: TT_FLIGHTREC_METRICS_INTERVAL
103+
104+
105+
.. _cfg_flightrec_requests_size:
106+
107+
.. confval:: flightrec_requests_size
108+
109+
Specifies the size (in bytes) of storage for the request and response data.
110+
You can set this parameter to ``0`` to disable a storage of requests and responses.
111+
112+
| Type: integer
113+
| Default: 10485760
114+
| Environment variable: TT_FLIGHTREC_REQUESTS_SIZE
115+
116+
117+
118+
.. _cfg_flightrec_requests_max_req_size:
119+
120+
.. confval:: flightrec_requests_max_req_size
121+
122+
Specifies the maximum size (in bytes) of a request entry.
123+
A request entry is truncated if this size is exceeded.
124+
125+
| Type: integer
126+
| Default: 16384
127+
| Environment variable: TT_FLIGHTREC_REQUESTS_MAX_REQ_SIZE
128+
129+
130+
.. _cfg_flightrec_requests_max_res_size:
131+
132+
.. confval:: flightrec_requests_max_res_size
133+
134+
Specifies the maximum size (in bytes) of a response entry.
135+
A response entry is truncated if this size is exceeded.
136+
137+
| Type: integer
138+
| Default: 16384
139+
| Environment variable: TT_FLIGHTREC_REQUESTS_MAX_RES_SIZE

doc/reference/configuration/index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ Logging
6060

6161
.. include:: cfg_logging.rst
6262

63+
Flight recorder
64+
---------------
65+
66+
.. include:: cfg_flight_recorder.rst
67+
6368
Feedback
6469
--------
6570

0 commit comments

Comments
 (0)