Skip to main content
Use OpenTelemetry AI semconv attributes on the current span, inside your @workflow-decorated function.
  • Set SpanAttributes.TRACELOOP_ENTITY_INPUT and/or SpanAttributes.TRACELOOP_ENTITY_OUTPUT.
  • Pass these via the attributes argument of update_current_span (not keywordsai_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.