mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-10 00:11:19 +00:00
* improve(diagnostics-otel): tune duration/context histogram bucket boundaries The openclaw.run.duration_ms, openclaw.harness.duration_ms, and openclaw.context.tokens histograms used the SDK default bucket boundaries. The default duration buckets top out at 10s, so agent runs — which routinely take minutes — all collapse into the +Inf overflow bucket, making p95/p99 latency meaningless without collector-side reconfiguration. Add explicit_bucket_boundaries advice via named constants, matching the existing GEN_AI_*_BUCKETS convention in this file: - AGENT_DURATION_MS_BUCKETS (1s … 1h) for the run and harness duration histograms, which share the same range. - CONTEXT_TOKENS_BUCKETS on a token scale (1k … 2M). openclaw.context.tokens records context-window limit/used token counts (e.g. 128000), so the boundaries must cover real context sizes rather than small integers. Adds a test asserting the three histograms advertise the expected boundaries and that run/harness share the same set. * fix(diagnostics-otel): preserve prior histogram buckets --------- Co-authored-by: Harry Chen <zhiling.chen@binance.com> Co-authored-by: Vincent Koc <25068+vincentkoc@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| src | ||
| api.ts | ||
| index.ts | ||
| npm-shrinkwrap.json | ||
| openclaw.plugin.json | ||
| package.json | ||
| README.md | ||
| runtime-api.ts | ||
| tsconfig.json | ||
@openclaw/diagnostics-otel
Official OpenTelemetry diagnostics exporter for OpenClaw.
This plugin exports OpenClaw Gateway traces, metrics, and logs to an OTLP collector for observability stacks such as Grafana, Datadog, Honeycomb, New Relic, Tempo, and compatible collectors. It can also write diagnostic log records as stdout JSONL for container log pipelines.
Install
openclaw plugins install @openclaw/diagnostics-otel
Restart the Gateway after installing or updating the plugin.
Configure
Enable the plugin and set the OTLP endpoint in plugins.entries.diagnostics-otel.config.
The full config surface, metric names, span names, and collector examples live in the docs:
Package
- Plugin id:
diagnostics-otel - Package:
@openclaw/diagnostics-otel - Minimum OpenClaw host:
2026.4.25