Override Span Input/Output
You can explicitly control what appears as a span’s input/output in the trace UI. Use OpenTelemetry AI semconv attributes on the current span, inside your@workflow-decorated function.
- Set
SpanAttributes.TRACELOOP_ENTITY_INPUTand/orSpanAttributes.TRACELOOP_ENTITY_OUTPUT. - Pass these via the
attributesargument ofupdate_current_span(notkeywordsai_params). - Values must be JSON‑serializable strings, so use
json.dumps(...). - Keep any custom metadata in
keywordsai_params["metadata"]as needed.
Use
update_current_span(attributes=...) to override the span’s displayed input/output. keywordsai_params do not map input or output to span attributes; they’re for metadata and KeywordsAI-specific options. After overriding, the trace view will display your custom values for the selected span.