Skip to content

Commit

Permalink
fix: add set service name for otel in local (#9644)
Browse files Browse the repository at this point in the history
Adds service names 

complementary to
#9642
  • Loading branch information
Maddiaa0 authored Nov 1, 2024
1 parent b880488 commit b70b6f1
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/tmux_split_args.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ session_name=$1
tmux kill-session -t "$session_name" 2>/dev/null || true

# Start a new tmux session with log level set
tmux new-session -d -s "$session_name" -e LOG_LEVEL=${LOG_LEVEL:-"debug"}
tmux new-session -d -s "$session_name" -e LOG_LEVEL=${LOG_LEVEL:-"debug"} \
-e OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=${OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:-} \
-e OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=${OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:-} \
-e OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=${OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:-} \
-e LOG_JSON=${LOG_JSON:-}

shift 1
commands=("$@")
Expand Down
6 changes: 6 additions & 0 deletions spartan/aztec-network/templates/prover-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ spec:
value: "0.0.0.0:{{ .Values.proverNode.service.p2pTcpPort }}"
- name: P2P_UDP_LISTEN_ADDR
value: "0.0.0.0:{{ .Values.proverNode.service.p2pUdpPort }}"
- name: OTEL_EXPORTER_OTLP_METRICS_ENDPOINT
value: {{ include "aztec-network.otelCollectorMetricsEndpoint" . | quote }}
- name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
value: {{ include "aztec-network.otelCollectorTracesEndpoint" . | quote }}
- name: OTEL_EXPORTER_OTLP_LOGS_ENDPOINT
value: {{ include "aztec-network.otelCollectorLogsEndpoint" . | quote }}
ports:
- containerPort: {{ .Values.proverNode.service.nodePort }}
- containerPort: {{ .Values.proverNode.service.p2pTcpPort }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export P2P_UDP_LISTEN_ADDR="0.0.0.0:40400"
export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT="${OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:-}"
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="${OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:-}"
export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT="${OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:-}"
export OTEL_RESOURCE_ATTRIBUTES="service.name=boot-node"
export VALIDATOR_PRIVATE_KEY="0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a"
REPO=$(git rev-parse --show-toplevel)

Expand Down
4 changes: 4 additions & 0 deletions yarn-project/end-to-end/scripts/native-network/prover-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export PROVER_PUBLISHER_PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478c
export PROVER_COORDINATION_NODE_URL="http://127.0.0.1:8080"
export AZTEC_NODE_URL="http://127.0.0.1:8080"
export PROVER_JOB_SOURCE_URL="http://127.0.0.1:$PORT"
export OTEL_RESOURCE_ATTRIBUTES="service.name=prover-node-${PORT}"
export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT="${OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:-}"
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="${OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:-}"
export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT="${OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:-}"

# Start the Prover Node with the prover and archiver
node --no-warnings "$REPO"/yarn-project/aztec/dest/bin/index.js start --port="$PORT" --prover-node --prover --archiver
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export P2P_TCP_ANNOUNCE_ADDR="127.0.0.1:$P2P_PORT"
export P2P_UDP_ANNOUNCE_ADDR="127.0.0.1:$P2P_PORT"
export P2P_TCP_LISTEN_ADDR="0.0.0.0:$P2P_PORT"
export P2P_UDP_LISTEN_ADDR="0.0.0.0:$P2P_PORT"
export OTEL_RESOURCE_ATTRIBUTES="service.name=validator-node-${PORT}"
export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT="${OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:-}"
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="${OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:-}"
export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT="${OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:-}"
Expand Down

0 comments on commit b70b6f1

Please sign in to comment.