Skip to content

Commit

Permalink
wb | tracing: correct describe-run; explicit NodeName in config
Browse files Browse the repository at this point in the history
  • Loading branch information
mgmeier committed Nov 19, 2024
1 parent 347255c commit 6c9bfc7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 14 deletions.
27 changes: 17 additions & 10 deletions nix/workbench/backend/supervisor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,23 @@ case "$op" in
local usage="USAGE: wb backend $op RUN-DIR"
local dir=${1:?$usage}

local basePort=$( envjq 'basePort')
local port_ekg=$(( basePort+$(envjq 'port_shift_ekg')))
local port_prometheus=$((basePort+$(envjq 'port_shift_prometheus')))
local port_rtview=$(( basePort+$(envjq 'port_shift_rtview')))

cat <<EOF
- RTView URL: http://localhost:$port_rtview
- EKG URL (node-0): http://localhost:$port_ekg/
- Prometheus URL (node-0): http://localhost:$port_prometheus/metrics
if jqtest '.node.tracing_backend == "trace-dispatcher"' "$dir"/profile.json
then
local basePort=$( envjq 'basePortTracer')
local port_ekg=$(( basePort+$(envjq 'port_shift_ekg')))
local port_prometheus=$((basePort+$(envjq 'port_shift_prometheus')))
local port_rtview=$(( basePort+$(envjq 'port_shift_rtview')))
cat <<EOF
- EKG URL (node-0): http://localhost:$port_ekg/node-0
- Prometheus URL (node-0): http://localhost:$port_prometheus/node-0
- RTView URL (depending on cardano-tracer build): http://localhost:$port_rtview
EOF

else cat <<EOF
- EKG URL (node-0): http://localhost:12788
- Prometheus URL (node-0): http://localhost:12798/metrics
EOF
fi
;;

start-node )
Expand Down Expand Up @@ -196,7 +203,7 @@ EOF
local usage="USAGE: wb backend $op RUN-DIR"
local dir=${1:?$usage}; shift

if jqtest ".node.tracer" "$dir"/profile.json
if jqtest '.node.tracing_backend == "trace-dispatcher"' "$dir"/profile.json
then if ! supervisorctl start tracer
then progress "supervisor" "$(red fatal: failed to start) $(white cardano-tracer)"
echo "$(red config.json) -------------------------------------" >&2
Expand Down
9 changes: 5 additions & 4 deletions nix/workbench/env.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
WB_ENV_DEFAULT='
{ "type": "supervisor"
, "cacheDir": "'${XDG_CACHE_HOME:-$HOME/.cache}'/cardano-workbench"
, "basePort": 30000
, "staggerPorts": true
{ "type": "supervisor"
, "cacheDir": "'${XDG_CACHE_HOME:-$HOME/.cache}'/cardano-workbench"
, "basePort": 30000
, "basePortTracer": 3000
, "staggerPorts": true
}'

export WB_ENV=$WB_ENV_DEFAULT
Expand Down
5 changes: 5 additions & 0 deletions nix/workbench/service/tracing.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ let
{
UseTraceDispatcher = true;
TraceOptionResourceFrequency = 1000;
TraceOptionNodeName = nodeSpec.name;

## Please see the generated tracing configuration reference at:
##
Expand Down Expand Up @@ -129,6 +130,10 @@ let
TraceBlockFetchServer = true;
TraceChainSyncHeaderServer = true;
TraceChainSyncClient = true;

## needs to be explicit when new tracing is the node's default
UseTraceDispatcher = false;

options = {
mapBackends = {
"cardano.node.resources" = [ "KatipBK" ];
Expand Down

0 comments on commit 6c9bfc7

Please sign in to comment.