We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c558fb9 commit cc37d40Copy full SHA for cc37d40
1 file changed
src/uipath_llamaindex/_cli/_tracing/_oteladapter.py
@@ -32,6 +32,11 @@ def _send_with_retries(
32
try:
33
# Parse the JSON string to a dictionary
34
attributes = json.loads(span_data["Attributes"])
35
+
36
+ if "openinference.span.kind" in attributes:
37
+ # Remove the span kind attribute
38
+ span_data["SpanType"] = attributes["openinference.span.kind"]
39
+ del attributes["openinference.span.kind"]
40
41
# Apply the transformation logic
42
for old_key, mapping in self.ATTRIBUTE_MAPPING.items():
@@ -51,6 +56,7 @@ def _send_with_retries(
51
56
span_data["attributes"] = json.dumps(attributes)
52
57
except json.JSONDecodeError as e:
53
58
logger.warning(f"Failed to parse attributes JSON: {e}")
59
54
60
55
61
return super()._send_with_retries(
62
url=url,
0 commit comments