Skip to content

Phoenix: derive OpenInference span kinds for traces that lack them - #9

Merged
mairp merged 1 commit into
mainfrom
feat/phoenix-span-kinds
Sep 25, 2026
Merged

mairp merged 1 commit into
mainfrom
feat/phoenix-span-kinds

Conversation

@mairp

@mairp mairp commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Phoenix's kind column reads the OpenInference attribute openinference.span.kind, not the OTel SpanKind. Most of our producers don't set it, so their spans showed unknown.

The new transform/phoenix_kind processor runs in the traces/phoenix pipeline only, and only sets the kind when the span doesn't already have one:

Scope Mapping
specstride run -> AGENT, tool -> TOOL, critic/verification -> EVALUATOR, agent_text -> LLM
openclaw-gateway openclaw.run / openclaw.harness.run -> AGENT, openclaw.exec -> TOOL. Spans that already have a kind (model calls LLM, tool executions TOOL) are left as they are.
any producer span names containing gate, guard, perimeter, killswitch, redact or sensitivity -> GUARDRAIL; everything else -> CHAIN

Tempo and ClickHouse data is unchanged.

Verified live: a fresh policy-router trace shows GUARDRAIL on its gate and guard steps and CHAIN on the rest in Phoenix, and the Tempo copy has no openinference attributes. otelcol validate passes.

https://claude.ai/code/session_016d5AJ1LjeunQ5sz5XEvxQQ

@mergify

mergify Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

Phoenix's "kind" column reads openinference.span.kind, which most of our
producers don't set, so their spans showed "unknown". transform/phoenix_kind
(traces/phoenix pipeline only) sets it when absent:
- specstride: run AGENT, tool TOOL, critic/verification EVALUATOR,
  agent_text LLM
- OpenClaw: run/harness.run AGENT, exec TOOL (its own LLM/TOOL spans are
  untouched)
- any producer: gate/guard/perimeter/killswitch/redact/sensitivity span
  names GUARDRAIL, everything else CHAIN
Tempo/ClickHouse data is unchanged. The comment on the Phoenix project
mapping no longer lists specific internal services.

Claude-Session: https://claude.ai/code/session_016d5AJ1LjeunQ5sz5XEvxQQ
Signed-off-by: mairp <oec.valle.art@gmail.com>
@mairp
mairp force-pushed the feat/phoenix-span-kinds branch from 71fc499 to acced5f Compare September 25, 2026 09:00
@mairp mairp changed the title Phoenix: derive OpenInference span kinds for sovereign-policy, specstride, OpenClaw Phoenix: derive OpenInference span kinds for traces that lack them Sep 25, 2026
@mairp
mairp merged commit 0a042fb into main Sep 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant