Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions config/openclaw/hydrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,16 @@ if [ "$MODE" = "gateway" ]; then
ANTHROPIC_API_KEY="${OPENCLAW_ANTHROPIC_API_KEY:-${ANTHROPIC_API_KEY:-$(read_secret "${SECRETS_DIR}/anthropic-key")}}"
CHROMIUM_PATH="@chromium@/bin/chromium"

# Resolve Alloy OTLP ClusterIP for local telemetry export
OTEL_ENDPOINT="http://$(kubectl get svc alloy -n alloy -o jsonpath='{.spec.clusterIP}' 2>/dev/null || echo localhost):4318"

@sed@ \
-e "s|__CLIPROXY_API_KEY__|${CLIPROXY_API_KEY}|g" \
-e "s|__TELEGRAM_TOKEN__|${TELEGRAM_TOKEN}|g" \
-e "s|__WHATSAPP_ALLOW_FROM__|${WHATSAPP_ALLOW_FROM}|g" \
-e "s|__GATEWAY_TOKEN__|${GATEWAY_TOKEN}|g" \
-e "s|__CHROMIUM_PATH__|${CHROMIUM_PATH}|g" \
-e "s|__OTEL_ENDPOINT__|${OTEL_ENDPOINT}|g" \
-e "s|__HOME__|${HOME}|g" \
"$TEMPLATE" >"$CONFIG"
chmod 600 "$CONFIG"
Expand Down
15 changes: 15 additions & 0 deletions config/openclaw/openclaw.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,18 @@
],
"allowRealIpFallback": true
},
"diagnostics": {
"enabled": true,
"otel": {
"enabled": true,
"endpoint": "__OTEL_ENDPOINT__",
"protocol": "http/protobuf",
"serviceName": "openclaw",
"traces": true,
"metrics": true,
"logs": true
}
Comment on lines +902 to +912

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Keep telemetry logs opt-in in the concrete template as well.

Line 910 sets "logs": true here too, so sensitive runtime logs may be exported by default. Align this with a safer default (false) unless explicitly required per environment.

Proposed change
   "diagnostics": {
     "enabled": true,
     "otel": {
       "enabled": true,
       "protocol": "http/protobuf",
       "serviceName": "openclaw",
       "traces": true,
       "metrics": true,
-      "logs": true
+      "logs": false
     }
   },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@config/openclaw/openclaw.template.json` around lines 902 - 911, The template
enables telemetry logs by default ("diagnostics" -> "otel" -> "logs": true);
change that value to false so runtime logs are opt-in rather than exported by
default, i.e., update the otel.logs setting under the diagnostics object (the
"diagnostics" / "otel" block) to "logs": false.

},
"plugins": {
"load": {
"paths": [
Expand All @@ -922,6 +934,9 @@
}
}
},
"diagnostics-otel": {
"enabled": true
},
"memory-wiki": {
"enabled": true,
"config": {
Expand Down
15 changes: 15 additions & 0 deletions config/openclaw/openclaw.tpl.json
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,18 @@
],
"allowRealIpFallback": true
},
"diagnostics": {
"enabled": true,
"otel": {
"enabled": true,
"endpoint": "__OTEL_ENDPOINT__",
"protocol": "http/protobuf",
"serviceName": "openclaw",
"traces": true,
"metrics": true,
"logs": true
}
Comment on lines +902 to +912

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Default OTLP log export is too permissive for a base template.

Line 910 sets "logs": true globally. In a shared template, that can forward sensitive runtime content by default. Safer default is opt-in logs.

Proposed change
   "diagnostics": {
     "enabled": true,
     "otel": {
       "enabled": true,
       "protocol": "http/protobuf",
       "serviceName": "openclaw",
       "traces": true,
       "metrics": true,
-      "logs": true
+      "logs": false
     }
   },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"diagnostics": {
"enabled": true,
"otel": {
"enabled": true,
"protocol": "http/protobuf",
"serviceName": "openclaw",
"traces": true,
"metrics": true,
"logs": true
}
"diagnostics": {
"enabled": true,
"otel": {
"enabled": true,
"protocol": "http/protobuf",
"serviceName": "openclaw",
"traces": true,
"metrics": true,
"logs": false
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@config/openclaw/openclaw.tpl.json` around lines 902 - 911, The template
enables OTLP logs by default which is too permissive; change the default under
the "diagnostics" -> "otel" block so "logs" is false (or remove it to require
explicit opt-in) and update any related documentation or config comments to
instruct consumers to opt in if they need log export; look for the
"diagnostics", "otel", "serviceName" and "logs" keys in the openclaw.tpl.json
and make "logs": false (or drop the key) to make log export opt-in.

},
"plugins": {
"load": {
"paths": [
Expand All @@ -922,6 +934,9 @@
}
}
},
"diagnostics-otel": {
"enabled": true
},
"memory-wiki": {
"enabled": true,
"config": {
Expand Down
Loading