mirror of
https://github.com/SigNoz/signoz.git
synced 2026-10-24 19:10:42 +01:00
<!--A few plain bullets saying what changed and why, for a reviewer skimming it - not a wall of text, not a restatement of the diff, not generated boilerplate.--> #### Description #### Description - Thread spans now carry `formatted_input`, `formatted_output`, `formatter` and `formatter_warnings`, with the messages in the OTel GenAI shape; the `genai` types mirror the semconv schema. - Tool spans are thread rows too, gated on `gen_ai.tool.name`, since they carry no input or output messages. - One normalizer added: the semconv passthrough plus the OpenAI chat format; a bare string becomes `text`, anything else `generic`, both with a warning. Other formats follow in separate PRs. - Unknown keys are dropped from the formatted view, the raw attribute on the span keeps them; object attributes are read from the JSON column only. - Formatter tests use the message attributes as the collector stored them for the SigNoz/scripts captures (litellm, langchain, OpenInference, bifrost), not hand-written samples. <!--Reference issues using `Closes #issue-number` to enable automatic closure on merge. --> #### Issues closed by this PR Part of https://github.com/SigNoz/nerve-pod/issues/266 #### Additional information. Please note that functions in formatter.go and openaichat.go are AI generated, and I have tested them through tests. - Converters are per message format, not per SDK. Covered now: SDKs writing semconv (litellm, langchain, openllmetry, portkey, traceloop LLM spans) and the OpenAI chat format (bifrost, openrouter input, OpenInference raw OpenAI calls). Not yet: tool spans, OpenInference flattened messages, OpenAI Responses items, openrouter's completion object, Vercel, traceloop legacy prompt keys, raw Anthropic and Gemini. The full table is in the design doc. - OpenAPI spec and the generated frontend client are in a separate commit. <!--Please delete paragraphs that you did not use before submitting.--> --- <sub>Stack created with <a href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>