Skip to content

Commit 0ca6538

Browse files
committed
config(aztec): Add opentelemetry endpoint option
1 parent 2e14a60 commit 0ca6538

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

modules/aztec/default.nix

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
type = types.listOf types.str;
1919
description = "Ethereum hosts for the sequencer";
2020
};
21+
metrics-collector-endpoint = mkOption {
22+
type = types.nullOr types.str;
23+
default = null;
24+
description = "OpenTelemetry OTLP metrics endpoint";
25+
};
2126
l1ConsensusHostUrls = mkOption {
2227
type = types.listOf types.str;
2328
description = "L1 consensus host URLs for the sequencer";
@@ -56,16 +61,20 @@
5661
serviceConfig = {
5762
WorkingDirectory = "/var/lib/aztec-sequencer";
5863

59-
ExecStart = pkgs.writeShellScript "aztec-sequencer" ''
60-
${lib.getExe package} start --node --archiver --sequencer \
61-
--network alpha-testnet \
62-
--l1-rpc-urls ${lib.concatStringsSep "," cfg.ethereumHosts} \
63-
--l1-consensus-host-urls ${lib.concatStringsSep "," cfg.l1ConsensusHostUrls} \
64-
--sequencer.validatorPrivateKeys "$(cat ${cfg.validatorPrivateKeys})" \
65-
--sequencer.coinbase ${cfg.coinbase} \
66-
--p2p.p2pIp ${cfg.p2pIp} \
67-
--p2p.p2pPort ${toString cfg.p2pPort}
68-
'';
64+
ExecStart =
65+
pkgs.writeShellScript "aztec-sequencer" ''
66+
${lib.getExe package} start --node --archiver --sequencer \
67+
--network alpha-testnet \
68+
--l1-rpc-urls ${lib.concatStringsSep "," cfg.ethereumHosts} \
69+
--l1-consensus-host-urls ${lib.concatStringsSep "," cfg.l1ConsensusHostUrls} \
70+
--sequencer.validatorPrivateKeys "$(cat ${cfg.validatorPrivateKeys})" \
71+
--sequencer.coinbase ${cfg.coinbase} \
72+
--p2p.p2pIp ${cfg.p2pIp} \
73+
--p2p.p2pPort ${toString cfg.p2pPort} \
74+
''
75+
+ lib.optionalString (cfg.metrics-collector-endpoint != null) ''
76+
--tel.metricsCollectorUrl ${cfg.metrics-collector-endpoint}
77+
'';
6978
};
7079
};
7180

0 commit comments

Comments
 (0)