Skip to content

Commit a175c46

Browse files
committed
imp: update generic-log-config tracers and comments
1 parent dbf6e86 commit a175c46

File tree

1 file changed

+59
-18
lines changed

1 file changed

+59
-18
lines changed

cardano-lib/generic-log-config.nix

Lines changed: 59 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
##### The Basics #####
3-
42
# Enable or disable logging overall
53
TurnOnLogging = true;
64

@@ -11,8 +9,6 @@
119
# Use the modern tracing system instead of the legacy tracing system.
1210
UseTraceDispatcher = true;
1311

14-
##### TODO: TITLE #####
15-
1612
# Match the metrics prefix of the legacy tracing system to minimize breaking
1713
# changes.
1814
TraceOptionMetricsPrefix = "cardano.node.metrics.";
@@ -27,43 +23,66 @@
2723
# The frequency of resource messages.
2824
TraceOptionResourceFrequency = 1000;
2925

30-
# TODO: Fix up following calcs in description
31-
#
32-
# Queue size control:
33-
# In case of a missing forwarding service consumer, traces messages will be
26+
# Queue size control: y
27+
# In case of a missing forwarding service consumer, trace messages will be
3428
# buffered. This mitigates short forwarding interruptions, or delays at
3529
# startup time.
3630
#
3731
# The queue capacity should thus correlate to the expected log lines per
3832
# second given a particular tracing configuration - to avoid unnecessarily
3933
# increasing memory footprint.
4034
#
41-
# The default values here are chosen to accommodate verbose tracing output
42-
# (i.e., buffering 1min worth of trace data given ~32 messages per second). A
43-
# config that results in less than 5 msgs per second should also provide
44-
# TraceOptionForwarder queue size values considerably lower. The
45-
# `disconnQueueSize` is the hard limit in that case.
46-
#
47-
# The queue sizes tie in with the max number of trace objects cardano-tracer
48-
# requests periodically, the default for that being 100. Here, the basic
49-
# queue can hold enough traces for 10 subsequent polls.
35+
# The maxReconnectDelay config option specifies the maximum delay in seconds
36+
# between (re-)connection attempts of a forwarder (default: 60s).
5037
TraceOptionForwarder = {
5138
connQueueSize = 64;
5239
disconnQueueSize = 128;
40+
maxReconnectDeplay = 60;
5341
};
5442

43+
# Tracing options for node
5544
TraceOptions = {
45+
# The default tracer configuration
5646
"" = {
5747
backends = [
58-
"Stdout HumanFormatColoured"
48+
# None, any combination, or all of the following backends can be
49+
# enabled, where `EKGBackend` forwards EKG resource status to
50+
# cardano-tracer, `Forwarder` forwards message traces and
51+
# `PrometheusSimple` serves cardano-node metrics directly from
52+
# cardano-node.
5953
"EKGBackend"
6054
"Forwarder"
55+
"PrometheusSimple 127.0.0.1 12799"
56+
57+
# Only one of the following can be enabled, which determines for format
58+
# of node logging to stdout.
59+
"Stdout HumanFormatColoured"
60+
# "Stdout HumanFormatUncoloured"
61+
# "Stdout MachineFormat"
6162
];
6263

64+
# Each tracer can specify the level of details for printing messages.
65+
# Options include `DMinimal`, `DNormal`, `DDetailed`, and `DMaximum`. If
66+
# no implementation is given, `DNormal` is chosen.
6367
detail = "DNormal";
68+
69+
# The severity levels, ranging from the least severe (`Debug`) to the
70+
# most severe (`Emergency`), provide a framework for ignoring messages
71+
# with severity levels below a globally configured severity cutoff.
72+
#
73+
# The full list of severities are:
74+
# `Debug`, `Info`, `Notice`, `Warning`, `Error`, `Critical`, `Alert` and
75+
# `Emergency`.
76+
#
77+
# To enhance severity filtering, there is also the option of `Silence`
78+
# which allows for the unconditional silencing of a specific trace,
79+
# essentially representing the deactivation of tracers -- a semantic
80+
# continuation of the functionality in the legacy system.
6481
severity = "Notice";
6582
};
6683

84+
# The following tracer configurations are configured to closely match the
85+
# default logging seen in the legacy cardano-node tracing system.
6786
"BlockFetch.Decision" = {
6887
severity = "Silence";
6988
};
@@ -120,6 +139,8 @@
120139
severity = "Info";
121140
};
122141

142+
143+
123144
"Net.Mux.Remote" = {
124145
severity = "Info";
125146
};
@@ -141,6 +162,8 @@
141162
};
142163

143164
"ChainDB.AddBlockEvent.AddedBlockToQueue" = {
165+
# A frequency limit for the number of messages per second may also be
166+
# provided for any tracer.
144167
maxFrequency = 2.0;
145168
};
146169

@@ -159,5 +182,23 @@
159182
"BlockFetch.Client.CompletedBlockFetch" = {
160183
maxFrequency = 2.0;
161184
};
185+
186+
# Uncomment UTXO-HD tracer adjustments for cardano-node 10.4
187+
#
188+
# These messages are UTxO-HD specific. On a regular node, the tracing
189+
# system might warn at startup about config inconsistencies as those
190+
# tracers do not exist. This warning is expected, and can be safely
191+
# ignored. Silencing the tracers below aims at having a comparable log line
192+
# rates in messages per second on both the UTxO-HD and regular node.
193+
# "ChainDB.LedgerEvent.Forker".severity = "Silence";
194+
# "Mempool.AttemptAdd".severity = "Silence";
195+
# "Mempool.AttemptingSync".severity = "Silence";
196+
# "Mempool.LedgerFound".severity = "Silence";
197+
# "Mempool.LedgerNotFound".severity = "Silence";
198+
# "Mempool.SyncDone".severity = "Silence";
199+
# "Mempool.SyncNotNeeded".severity = "Silence";
200+
201+
# Enable this to investigate transaction validation errors.
202+
# "Mempool.RejectedTx".detail = "DDetailed";
162203
};
163204
}

0 commit comments

Comments
 (0)