fix(obsidian): seed per-vault config and enable openclaw OTLP

Merged
SH
6mo ago
+34-0

Summary

  • Obsidian fix: activate.sh now seeds missing <vault-id>.json files (e.g. wiki.json) in ~/.config/obsidian/ on activation. This eliminates the ENOENT: no such file or directory, open '/home/ubuntu/.config/obsidian/wiki.json' error logged on every daemon restart.
  • OpenClaw OTLP: Enables diagnostics-otel plugin and adds top-level diagnostics config block to both template files with traces, metrics, and logs over http/protobuf.
  • Removed the chmod 644 on obsidian.json so Obsidian can write back to it (update timestamps, vault state) without EACCES errors during activation races.

Test plan

  • shellspec spec/activate_config_spec.sh passes (25 examples, 0 failures)
  • shellspec spec/openclaw_hydrate_spec.sh passes (20 examples, 0 failures)
  • Both JSON templates validate
  • Tested activate.sh creates wiki.json for new vaults and preserves existing ones
  • Manually seeded wiki.json on kyber - next obsidian restart should be clean

Summary by cubic

Turns on OpenClaw OTLP telemetry (http/protobuf) and auto-wires the endpoint to the in-cluster Alloy collector during hydration. Adds a top-level diagnostics block and enables the diagnostics-otel plugin in both templates.

  • New Features
    • Add diagnostics.otel config in openclaw.template.json and openclaw.tpl.json (serviceName "openclaw"; traces, metrics, logs enabled; endpoint placeholder __OTEL_ENDPOINT__).
    • Hydration resolves __OTEL_ENDPOINT__ to http://<Alloy ClusterIP>:4318 via kubectl, falling back to http://localhost:4318.