Capture full span content, not a size count#30
Merged
Conversation
Signed-off-by: Adam Gurary <guraryadam@gmail.com>
Signed-off-by: Adam Gurary <guraryadam@gmail.com>
B-Step62
approved these changes
Jul 25, 2026
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.
Fixes #28
Context
This issue is one finding from a hands-on evaluation (a Critical User Journey run) of building, tracing, and improving an agent that runs off Databricks. The agent is a LangGraph rebuild of a customer-notes workflow. It runs on a laptop and calls the Databricks Foundation Model API endpoint
databricks-claude-opus-4-8. Its MLflow traces are written to Unity Catalog.Full writeup:
Environment
Instrumentation skill should capture full span content, not a size count
Summary
When a coding agent (Claude Code) used the MLflow instrumentation skills to add tracing, it recorded only a size count in each research span (for example
matches: 20orchars: N) instead of the retrieved content itself. That left the traces with nothing to debug from. The trace store accepts large attributes, so the truncation was unnecessary and actively harmful to the analysis that followed.Steps to reproduce
Actual behavior
Research spans recorded only a count where the retrieved text belonged. Example span output:
The actual retrieved content (Slack messages, documents) was not recorded, so the spans could not be used to see what the agent actually retrieved.
Root cause
The skill guidance led the agent to record a conservative size summary rather than the full content, apparently out of a concern about attribute size limits. A direct test showed that concern is unfounded: the UC OTel span attribute store accepted single string attributes of 50K, 200K, and 500K characters and read them back with full fidelity.
Expected behavior and proposed fix
The MLflow instrumentation skills should teach the coding agent to record full span inputs and outputs by default, never a bare size count where content belongs. The skill should state that the trace store accepts large attributes, so capturing complete content is the default and truncation must be a deliberate, documented exception.
Evidence and references
Fixed in the agent repo by removing all size caps and capturing full content (commit 21cea8d49). See the walkthrough linked above.