OpenInference-shaped views at egress, not OTel emission #4

Open
opened 2026-05-23 20:55:34 +00:00 by coilysiren · 0 comments
Owner

Originally filed by @coilysiren on 2026-05-17T17:30:52Z - https://github.com/coilysiren/session-lattice/issues/13

Problem

The substrate's pivot from a four-tier OTel-spans pipeline to a stateless consumer of session-lattice views (per agentic-os-kai/docs/substrate.md) removes any OTel surface from the stack. That is the right call for the ingest path. It is the wrong call for egress, for two reasons:

  1. bug-finder needs a frozen corpus that can be visualized somewhere. Without an OpenTelemetry / OpenInference-shaped view, bug-finder either re-implements a trace UI or ships as numbers-only.
  2. The OpenInference ecosystem (Phoenix, Arize, and a growing list of evals tooling) already speaks a stable column shape for agent traces. A session-lattice view in that shape interoperates with the ecosystem at near-zero cost.

This is not a reversion to the retired OTel pipeline. Primary sources stay Claude session JSONL, git log, GitHub. The OpenInference view sits at egress, on top of repo-recall-fed views, not as an emitter upstream of repo-recall.

Proposal

Add a Feldera SQL pack to session-lattice that maintains materialized views in OpenInference's column shape. Specifically:

  • Columns: trace_id, span_id, parent_span_id, start_time, end_time, name, status_code, status_message, attributes (JSON).
  • OpenInference semantic-convention attributes broken out: openinference.span.kind (LLM / TOOL / CHAIN / RETRIEVER / AGENT / EMBEDDING), input.value, output.value, llm.model_name, llm.token_count.prompt, llm.token_count.completion, tool.name, tool.parameters.
  • View name pins the semconv version: openinference_spans_v0_1_x. A future bump adds a new view rather than mutating the existing one.
  • Trace ID generation: deterministic map from Claude session UUID. Span IDs deterministic from (session_id, turn_index, tool_index) so re-running the materialization is stable.
  • Span hierarchy: parent-child links populated for tool invocations under an assistant turn. Subagent / nested-invocation handling is an open sub-question.

Out of scope for v1

  • No live OTLP gRPC/HTTP exporter. The view is queryable via the existing HTTP egress; anyone who wants a push exporter can poll + POST themselves until there is real demand.
  • No commitment to keep the column shape stable across OpenInference major versions. The version pin in the view name is the contract.
  • No re-introduction of OTel into the ingest path.

Why this earns its keep

The single strongest argument is the bug-finder hook. With this view in place, bug-finder's frozen-corpus capture writes Parquet in OpenInference schema and an installer drops it into a local Phoenix instance for a trace UI. Without it, bug-finder needs its own visualization layer.

Interop with the broader OpenInference ecosystem (Arize, hosted Phoenix, OpenLLMetry) is a free secondary benefit.

Open design sub-questions

  • Subagent / nested-invocation parent-span linking. Claude session JSONL may not surface this cleanly; needs explicit attention.
  • Whether attributes JSON should be a single column or normalized into typed attribute columns. Phoenix loaders work fine with JSON; SQL ergonomics are better with typed columns. Probably both, via two adjacent views.
  • Whether to also emit OpenInference Traces over OTLP for runtime push later. Reserve the decision until someone asks.

Origin

Conversation 2026-05-17. Pairs with the substrate framing in agentic-os-kai/docs/substrate.md, the OpenInference standard, and the Arize "agent telemetry needs standards" piece.

_Originally filed by @coilysiren on 2026-05-17T17:30:52Z - [https://github.com/coilysiren/session-lattice/issues/13](https://github.com/coilysiren/session-lattice/issues/13)_ **Problem** The substrate's pivot from a four-tier OTel-spans pipeline to a stateless consumer of session-lattice views (per `agentic-os-kai/docs/substrate.md`) removes any OTel surface from the stack. That is the right call for the ingest path. It is the wrong call for **egress**, for two reasons: 1. **bug-finder** needs a frozen corpus that can be visualized somewhere. Without an OpenTelemetry / OpenInference-shaped view, bug-finder either re-implements a trace UI or ships as numbers-only. 2. The OpenInference ecosystem (Phoenix, Arize, and a growing list of evals tooling) already speaks a stable column shape for agent traces. A session-lattice view in that shape interoperates with the ecosystem at near-zero cost. This is **not** a reversion to the retired OTel pipeline. Primary sources stay Claude session JSONL, git log, GitHub. The OpenInference view sits at egress, on top of repo-recall-fed views, not as an emitter upstream of repo-recall. **Proposal** Add a Feldera SQL pack to session-lattice that maintains materialized views in OpenInference's column shape. Specifically: - Columns: `trace_id`, `span_id`, `parent_span_id`, `start_time`, `end_time`, `name`, `status_code`, `status_message`, `attributes` (JSON). - OpenInference semantic-convention attributes broken out: `openinference.span.kind` (LLM / TOOL / CHAIN / RETRIEVER / AGENT / EMBEDDING), `input.value`, `output.value`, `llm.model_name`, `llm.token_count.prompt`, `llm.token_count.completion`, `tool.name`, `tool.parameters`. - View name pins the semconv version: `openinference_spans_v0_1_x`. A future bump adds a new view rather than mutating the existing one. - Trace ID generation: deterministic map from Claude session UUID. Span IDs deterministic from `(session_id, turn_index, tool_index)` so re-running the materialization is stable. - Span hierarchy: parent-child links populated for tool invocations under an assistant turn. Subagent / nested-invocation handling is an open sub-question. **Out of scope for v1** - No live OTLP gRPC/HTTP exporter. The view is queryable via the existing HTTP egress; anyone who wants a push exporter can poll + POST themselves until there is real demand. - No commitment to keep the column shape stable across OpenInference major versions. The version pin in the view name is the contract. - No re-introduction of OTel into the ingest path. **Why this earns its keep** The single strongest argument is the bug-finder hook. With this view in place, bug-finder's frozen-corpus capture writes Parquet in OpenInference schema and an installer drops it into a local Phoenix instance for a trace UI. Without it, bug-finder needs its own visualization layer. Interop with the broader OpenInference ecosystem (Arize, hosted Phoenix, OpenLLMetry) is a free secondary benefit. **Open design sub-questions** - Subagent / nested-invocation parent-span linking. Claude session JSONL may not surface this cleanly; needs explicit attention. - Whether `attributes` JSON should be a single column or normalized into typed attribute columns. Phoenix loaders work fine with JSON; SQL ergonomics are better with typed columns. Probably both, via two adjacent views. - Whether to also emit OpenInference Traces over OTLP for runtime push later. Reserve the decision until someone asks. **Origin** Conversation 2026-05-17. Pairs with the substrate framing in `agentic-os-kai/docs/substrate.md`, the OpenInference standard, and the Arize "agent telemetry needs standards" piece.
coilysiren added
P3
and removed
P2
labels 2026-05-31 07:01:22 +00:00
Sign in to join this conversation.
No labels
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/session-lattice#4
No description provided.