Skip to content

Commit 7be55c7

Browse files
committed
imp: use nixos tracer svc option descripts in generic tracer cfg
1 parent 00e55fb commit 7be55c7

File tree

1 file changed

+163
-3
lines changed

1 file changed

+163
-3
lines changed
Lines changed: 163 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,213 @@
11
{
2+
# Cardano-tracer settings here do *not* affect the message detail or
3+
# filtering of what the provider source is configured to emit.
4+
#
25
# Cardano-tracer will use default values where parameters are set to null.
6+
7+
# ------------
8+
9+
# WarnRTViewMissing indicates whether to provide a warning if RTView is
10+
# requested in config but cardano-tracer was built without it.
11+
#
12+
# If null cardano-tracer will set a default: true if RTView
13+
# config is provided but cardano-tracer was built without it, false
14+
# otherwise.
315
WarnRTViewMissing = null;
16+
17+
# ekgRequestFreq specifies the period of how often EKG metrics will be
18+
# requested, in seconds. For example, if ekgRequestFreq is 10, cardano-tracer
19+
# will ask for new EKG metrics every ten seconds. There is no limit as
20+
# loRequestNum, so every request returns all the metrics the provider has at
21+
# that moment of time.
22+
#
23+
# If null cardano-tracer will set a default: 1.
424
ekgRequestFreq = null;
25+
26+
# When receiving forwarded metrics, cardano-tracer can request a full
27+
# set of EKG metrics, or a delta from the previous request.
28+
#
29+
# If ekgRequestFull is set true, a full set of metrics will be sent on each
30+
# request. Otherwise, on false, only a metrics delta to the previous request
31+
# will be sent.
32+
#
33+
# If null cardano-tracer will set a default: false.
534
ekgRequestFull = null;
635

736
# Whether to enable an EKG http interface for process monitoring.
837
hasEKG = {
38+
# The host to bind if EKG is enabled.
939
epHost = "127.0.0.1";
40+
41+
# The port to listen on if EKG is enabled.
1042
epPort = 12788;
1143
};
1244

1345
# Whether to enable a prometheus export of metrics.
1446
hasPrometheus = {
47+
# The host to bind if prometheus is enabled.
1548
epHost = "127.0.0.1";
49+
50+
# The port to listen on if prometheus is enabled.
51+
#
52+
# Defaults to the legacy prometheus listening port, 12798, plus 10.
53+
# This avoids a conflict with the cardano-node default metrics port binding
54+
# when PrometheusSimple backend is in use.
1655
epPort = 12808;
1756
};
1857

58+
# loRequestNum specifies the number of log items that will be requested from
59+
# the providing source. For example, if loRequestNum is 10, cardano-tracer
60+
# will periodically ask for 10 log items in one request. This value is useful
61+
# for fine-tuning network traffic: it is possible to ask 50 log items in one
62+
# request, or ask for them in 50 requests one at a time. loRequestNum is the
63+
# maximum number of log items. For example, if cardano-tracer requests 50 log
64+
# items but the provider has only 40 at that moment, these 40 items will be
65+
# returned and the request won't block to wait for an additional 10 items.
66+
#
67+
# If null cardano-tracer will set a default: 100.
1968
loRequestNum = null;
2069

2170
# Configure default logging
2271
logging = [
2372
{
73+
# logFormat specifies the format of logs. There are two possible modes:
74+
# `ForMachine` and `ForHuman`. ForMachine is for JSON format, ForHuman is
75+
# for human-friendly text format. Since the logging option accepts a
76+
# list, more than one logging section can be declared.
2477
logFormat = "ForHuman";
78+
79+
# logMode specifies logging mode. There are two possible modes:
80+
# `FileMode` and `JournalMode`. FileMode is for storing logs to the
81+
# files, JournalMode is for storing them in systemd's journal. If you
82+
# choose JournalMode, the logRoot option, will be ignored.
2583
logMode = "FileMode";
84+
85+
# logRoot specifies the path to the root directory. This directory will
86+
# contain all the subdirectories with the log files inside. Remember that
87+
# each subdirectory corresponds to the particular provider. If the root
88+
# directory does not exist, it will be created.
2689
logRoot = "/tmp/cardano-tracer";
2790
}
2891
];
2992

93+
# Passing metrics help annotations to cardano-tracer can be done as an
94+
# attribute set of strings from metric's name to help text where
95+
# cardano-tracer's internal metric names have to be used as the attribute
96+
# names.
97+
#
98+
# If such a set is already available as JSON in a file, this option can
99+
# be declared as a string of the path to such a file.
100+
#
101+
# Any metrics prefix declared in provider config, such as
102+
# `TraceOptionMetricsPrefix` in cardano-node, should not be included in the
103+
# attribute name. Similarly, metric type suffixes such as `.int` or `.real`,
104+
# should also not be included.
105+
#
106+
# The effect of this option applies to prometheus metrics only, ie: not
107+
# EKG.
108+
#
109+
# An example of usage is for node provided metrics is:
110+
#
111+
# metricsHelp = {
112+
# "Mem.resident" = "Kernel-reported RSS (resident set size)";
113+
# "RTS.gcMajorNum" = "Major GCs";
114+
# };
30115
metricsHelp = null;
116+
117+
# If metricsNoSuffix is set true, metrics name suffixes, like "_int", will be
118+
# dropped, thus increasing the similarity with legacy tracing system names.
119+
#
120+
# The effect of this option applies to prometheus metrics only, ie: not EKG.
121+
#
122+
# If null cardano-tracer will set a default: false.
31123
metricsNoSuffix = null;
32124

33125
# Configure default cardano-tracer operational mode
34126
network = {
35-
contents = "/tmp/cardano-tracer.socket";
127+
# The tag must be either `AcceptAt` or `ConnectTo`.
128+
#
129+
# AcceptAt means that cardano-tracer works as a server: it receives network
130+
# connections from providers such as node via a single local socket
131+
# provided by cardano-tracer.
132+
#
133+
# ConnectTo means that cardano-tracer works as a client: it establishes
134+
# network connections with local socket(s) provided by the provider(s).
135+
# In this case a socket is used for each provider.
136+
#
137+
# Except for special use cases, AcceptAt is the recommended tag as it
138+
# supports dynamic provider addition or removal without requiring
139+
# cardano-tracer reconfiguration and restart.
36140
tag = "AcceptAt";
141+
142+
# If the network tag is AcceptAt, contents expects a string declaring the
143+
# socket path that cardano-tracer will create and listen on.
144+
contents = "/tmp/cardano-tracer.socket";
145+
146+
# On the other hand, if network tag is ConnectTo, contents expects a list
147+
# of strings declaring the socket paths created by provider(s) which
148+
# cardano-tracer will connect to.
149+
# contents = [
150+
# "/tmp/cardano-node-1.sock"
151+
# "/tmp/cardano-node-1.sock"
152+
# "/tmp/cardano-node-1.sock"
153+
# ];
37154
};
38155

39-
# The network magic will need to be set per environment
156+
# The network magic of the cardano environment which will be connected with
157+
# cardano-tracer. The per environment `tracerConfig` attribute provided by
158+
# cardano-lib will merge each environment's network magic with this
159+
# generic-tracer-config.
40160
# networkMagic = ... ;
41161

162+
# The period for tracing cardano-tracer's own resource usage in milliseconds.
163+
# For example, if set to 60000, resources will traced every 60 seconds. If null
164+
# cardano-tracer will not display resource usage.
42165
resourceFreq = null;
43166

44-
# Configure default rotation
167+
# Configure default rotation.
168+
#
169+
# Please note that if the rotation declaration is skipped, all log items will
170+
# be stored in a single file, and usually that's not what is desired.
171+
#
172+
# This option will be ignored if all logging has `logMode` configured
173+
# as `JournalMode`.
45174
rotation = {
175+
176+
# rpFrequencySecs specifies rotation period, in seconds.
46177
rpFrequencySecs = 60;
178+
179+
# rpKeepFilesNum specifies the number of the log files that will be kept.
180+
# The last (newest) log files will always be the ones kept, whereas the first
181+
# (oldest) log files will be purged.
47182
rpKeepFilesNum = 14;
183+
184+
# rpLogLimitBytes specifies the maximum size of the log file, in bytes.
185+
# Once the size of the current log file reaches this value, a new log file
186+
# will be created.
48187
rpLogLimitBytes = 10000000;
188+
189+
# rpMaxAgeHours specifies the lifetime of the log file in hours. Once the
190+
# log file reaches this value, it is treated as outdated and will be deleted.
191+
# Please note that N last log files, specified by option rpKeepFilesNum, will
192+
# be kept even if they are outdated. If the rpMaxAgeMinutes option is also
193+
# declared then it takes precedence.
49194
rpMaxAgeHours = 24;
195+
196+
# rpMaxAgeMinutes specifies the lifetime of the log file in minutes. Once
197+
# the log file reaches this value, it is treated as outdated and will be
198+
# deleted. Please note that N last log files, specified by option
199+
# rpKeepFilesNum, will be kept even if they are outdated. If the
200+
# rpMaxAgeHours option is also declared this option takes precedence.
201+
# rpMaxAgeMinutes = 24 * 60;
50202
};
51203

204+
# verbosity specifies the level for cardano-tracer itself. There are 3
205+
# levels:
206+
#
207+
# Minimum - cardano-tracer will work as silently as possible.
208+
# ErrorsOnly - messages about problems will be shown in standard output.
209+
# Maximum - all the messages will be shown in standard output. Caution: the number of messages can be huge.
210+
#
211+
# If null cardano-tracer will set a default: ErrorsOnly.
52212
verbosity = null;
53213
}

0 commit comments

Comments
 (0)