Skip to content

dikw-core v0.5.3

Choose a tag to compare

@helebest helebest released this 16 Jun 14:38
· 44 commits to main since this release
01d3f2c

OpenTelemetry observability — complete (PR1–PR5, #200#207)

dikw-core now ships full traces + metrics + logs instrumentation behind an optional [otel] extra — off by default, zero-cost when unused — so its runtime data integrates with any OTLP backend (Jaeger/Tempo, Prometheus/Grafana, Datadog, …).

  • Traces — one trace spans client → HTTP server → background task → engine op → provider call. gen_ai.* spans carry model + token usage (incl. Anthropic prompt-cache tokens); each retrieval fusion leg (BM25/vector/asset/graph) gets its own span.
  • Metrics — GenAI token.usage + operation.duration histograms and dikw-domain counters/histograms (ingest / synth / embed / retrieve / task), exported over OTLP/HTTP.
  • LogsDIKW_LOG_FORMAT=json emits structured log records carrying trace_id / span_id / service for log↔trace correlation (text default unchanged, byte-for-byte).
  • Docs + validation stack — new docs/observability.md operator cookbook + a one-command docker compose stack (OTel Collector → Jaeger / Prometheus / Grafana).

Enable server-side via a telemetry: section in dikw.yml; the dikw client CLI joins the same trace via the standard OTEL_* env vars.

Synth prompt restructure (#199)

The cached synth system prompt is rewritten into a six-invariant standing-policy spine with a correspondingly slimmed user prompt (single source of truth per rule); synth now forbids sources / lint in emitted front-matter — both are engine-owned.


Full changelog: CHANGELOG.md → 0.5.3

Install: pip install 'dikw-core==0.5.3' — add the [otel] extra for observability, [postgres] for the pgvector backend.