OpenViking icon indicating copy to clipboard operation
OpenViking copied to clipboard

[Feature]: A content-free trace mode for server OTLP traces and vikingbot Langfuse

Open ragnos-dev opened this issue 2 weeks ago • 0 comments

Version

OpenViking v0.5.4 (9dfa9017a). The same code is on current main (checked 2026-11-13).

Summary

With server.observability.traces or bot.langfuse enabled, spans and generations carry content: request paths and query strings, exception messages in span events and status descriptions, tool arguments, and model input and output. A deployment whose corpus holds private documents cannot turn tracing on without copying that text to the trace backend.

Code paths: openviking/telemetry/tracer.py and bot/vikingbot/integrations/langfuse.py.

Reproduction

  1. Enable OTLP traces to any collector, call a search endpoint with a query string, and make one request fail. The exported spans hold the query and the error message.
  2. Enable bot.langfuse and run any agent turn. The generation holds the prompt and the response.

Proposed fix

One setting (for example observability.capture_content: false) that makes both paths export structure only:

  • OTLP: span names, timings, status codes, numeric attributes and an allowlist of identifier attributes (method, route, operation, request, account and user IDs), with no events, no status descriptions and no free-form strings.
  • Langfuse: no input, output, status_message or comment, and media upload off.

We run a local patch that wraps the OTLP exporter in an allowlisting exporter and filters the Langfuse client calls. A native setting would make that patch unnecessary; happy to turn it into a PR if the approach works for you.

Related: #3429 (closed) proposed dropping raw query strings from spans.

ragnos-dev avatar Nov 13 '26 14:11 ragnos-dev