Skip to content

Commit b283588

Browse files
Improve Cleanlab Instrumentation (#529)
* cleanlab fix * bump version
1 parent 5f89b69 commit b283588

File tree

1 file changed

+4
-0
lines changed
  • src/langtrace_python_sdk/instrumentation/cleanlab

1 file changed

+4
-0
lines changed

src/langtrace_python_sdk/instrumentation/cleanlab/patch.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ def traced_method(
6363
result_json = str(result)
6464

6565
span.set_attribute("tlm.result", str(result_json))
66+
trustworthiness_score = result_json["trustworthiness_score"]
67+
log = result_json["log"]
68+
span.set_attribute("tlm.trustworthiness_score", str(trustworthiness_score))
69+
span.set_attribute("tlm.explanation", str(log.get("explanation", "")))
6670
span.set_status(Status(StatusCode.OK))
6771

6872
return result

0 commit comments

Comments
 (0)