Skip to content

Commit

Permalink
imp: start adding new tracing system support
Browse files Browse the repository at this point in the history
  • Loading branch information
johnalotoski committed May 8, 2024
1 parent 5fad6e3 commit 0ca5b3f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 17 deletions.
47 changes: 30 additions & 17 deletions flake/nixosModules/profile-cardano-node-group.nix
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,17 @@
cardanoNodePackages = mkDefault cardano-node-pkgs;
nodeId = mkDefault nodeId;

# We're still on legacy tracing system for now, but flip this when we're ready.
# Also review iohk-nix and cardano-node nixos service related changes.
useLegacyTracing = mkDefault true;

# Once the new tracing system is default, this can be simplified and iohk-nix updated.
nodeConfig = mkDefault (
if cfg.useLegacyTracing
then cardanoLib.environments.${environmentName}.nodeConfig
else removeAttrs cardanoLib.environments.${environmentName}.nodeConfig ["hasEKG" "hasPrometheus" "rotation"]
);

# Fall back to the iohk-nix environment base topology definition if no custom producers are defined.
useNewTopology = mkDefault true;
useSystemdReload = mkDefault true;
Expand Down Expand Up @@ -256,23 +267,25 @@
producers = mkDefault [];
publicProducers = mkDefault [];

extraNodeConfig = {
hasPrometheus = [cfg.hostAddr cardanoNodePrometheusExporterPort];

# The maximum number of used peers when fetching newly forged blocks
MaxConcurrencyDeadline = 4;

# Use Journald output
setupScribes = [
{
scKind = "JournalSK";
scName = "cardano";
scFormat = "ScText";
}
];

defaultScribes = [["JournalSK" "cardano"]];
};
extraNodeConfig =
{
# The maximum number of used peers when fetching newly forged blocks
MaxConcurrencyDeadline = 4;
}
// optionalAttrs cfg.useLegacyTracing {
hasPrometheus = [cfg.hostAddr cardanoNodePrometheusExporterPort];

# Use Journald output
setupScribes = [
{
scKind = "JournalSK";
scName = "cardano";
scFormat = "ScText";
}
];

defaultScribes = [["JournalSK" "cardano"]];
};

extraServiceConfig = _: {
# Allow up to 10 failures with 30 second restarts in a 15 minute window
Expand Down
2 changes: 2 additions & 0 deletions flakeModules/pkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ in
(mkPkg "cardano-submit-api" caPkgs."cardano-submit-api-input-output-hk-cardano-node-8-9-2-424983f")
(mkPkg "cardano-submit-api-ng" caPkgs."cardano-submit-api-input-output-hk-cardano-node-8-10-1-pre-1ffe4a5")
(mkPkg "cardano-tracer" caPkgs."cardano-tracer-input-output-hk-cardano-node-8-9-2-424983f")
(mkPkg "cardano-tracer-ng" caPkgs."cardano-tracer-input-output-hk-cardano-node-8-10-1-pre-1ffe4a5")
(mkPkg "cardano-wallet" (caPkgs.cardano-wallet-cardano-foundation-cardano-wallet-v2024-03-01-d372d86
// {
pname = "cardano-wallet";
Expand Down Expand Up @@ -484,6 +485,7 @@ in
cardano-node-ng = mkWrapper "cardano-node-ng" cfgPkgs.cardano-node-ng;
cardano-smash-ng = mkWrapper "cardano-smash-ng" cfgPkgs.cardano-smash-ng;
cardano-submit-api-ng = mkWrapper "cardano-submit-api-ng" cfgPkgs.cardano-submit-api-ng;
cardano-tracer-ng = mkWrapper "cardano-tracer-ng" cfgPkgs.cardano-tracer-ng;
db-analyser-ng = mkWrapper "db-analyser-ng" cfgPkgs.db-analyser-ng;
db-synthesizer-ng = mkWrapper "db-synthesizer-ng" cfgPkgs.db-synthesizer-ng;
db-truncater-ng = mkWrapper "db-truncater-ng" cfgPkgs.db-truncater-ng;
Expand Down

0 comments on commit 0ca5b3f

Please sign in to comment.