docs(otel): document the span-wide cap on OpenInference per-index message attributes - #1403
Open
devin-ai-integration[bot] wants to merge 4 commits into
Open
docs(otel): document the span-wide cap on OpenInference per-index message attributes#1403devin-ai-integration[bot] wants to merge 4 commits into
devin-ai-integration[bot] wants to merge 4 commits into
Conversation
…sage attributes Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
bugbot run |
…st turns Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…rays Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 08d95e8. Configure here.
Contributor
Author
There was a problem hiding this comment.
Devin Review found 1 new potential issue.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
… role Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Companion to BerriAI/litellm#40562 (LIT-4875). The
openinferencemapper now capsllm.input_messages.{idx}.*andllm.output_messages.{idx}.*under one span-wide allowance (an eighth of the 128 default, 8 messages total, at least half reserved for the response) so long conversations stop evicting thegen_ai.*model, usage, cost, and finish-reason attributes. This adds a "Chat messages are capped" section next to the existing "Tool definitions are capped" one and links the two per-index rows in the openinference attribute table to itThe section spells out which prompt messages keep their keys when the prompt is over budget: message 0 plus the most recent turns, under their original indices, so a 60-turn prompt with one reply yields
llm.input_messages.0,.54through.59, andllm.output_messages.0. Phoenix renders those as a dense list in the same order, which the section calls out so a reader does not mistake the gap for lost messagesThe attribute table now describes
input.valueandoutput.valueas arrays of each message's role and text, since the mapper builds them frommessage_content()and drops tool calls and non-text parts. Only the canonicalgen_ai.input.messagesandgen_ai.output.messagesblobs carry the full message objectsLink to Devin session: https://app.devin.ai/sessions/9136fdfc8ff84ec5aa190a20c36965d4
Open in Devin Desktop: https://app.devin.ai/desktop/session/9136fdfc8ff84ec5aa190a20c36965d4?variant=devin
Requested by: @yucheng-berri
Note
Low Risk
Documentation-only changes to OTel v2 observability guides; no runtime or security impact.
Overview
Documents OpenInference per-index chat message capping for OTel v2, as a companion to the implementation in the linked PR.
Adds a "Chat messages are capped" section beside the existing tool-definition cap: it explains why
llm.input_messages.{idx}.*andllm.output_messages.{idx}.*share a span-wide budget (8 messages under the default 128-attribute limit, with at least half reserved for the response), which indices survive on long threads (message 0 plus the most recent turns), and thatinput.value/output.valueandgen_ai.*message blobs are not truncated by this cap.The OpenInference attribute table now links the per-index message rows to that section and clarifies that
input.valueandoutput.valueare JSON arrays of each message's role and text (not full objects with tool calls). It also notes Phoenix compacts sparse per-index keys when rendering.Reviewed by Cursor Bugbot for commit 08d95e8. Bugbot is set up for automated code reviews on this repo. Configure here.