Skip to content

Commit cc37d40

Browse files
committed
fix5
1 parent c558fb9 commit cc37d40

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/uipath_llamaindex/_cli/_tracing/_oteladapter.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ def _send_with_retries(
3232
try:
3333
# Parse the JSON string to a dictionary
3434
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"]
3540

3641
# Apply the transformation logic
3742
for old_key, mapping in self.ATTRIBUTE_MAPPING.items():
@@ -51,6 +56,7 @@ def _send_with_retries(
5156
span_data["attributes"] = json.dumps(attributes)
5257
except json.JSONDecodeError as e:
5358
logger.warning(f"Failed to parse attributes JSON: {e}")
59+
5460

5561
return super()._send_with_retries(
5662
url=url,

0 commit comments

Comments
 (0)