Skip to content

Commit bbbdad5

Browse files
committed
correct state to "Indeterminate"
1 parent ede0933 commit bbbdad5

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

agentops/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def end_trace(
240240
241241
Args:
242242
trace_context: The TraceContext object returned by start_trace. If None, ends all active traces.
243-
end_state: The final state of the trace (e.g., "Success", "Failure", "Error").
243+
end_state: The final state of the trace (e.g., "Success", "Indeterminate", "Error").
244244
"""
245245
if not tracer.initialized:
246246
logger.warning("AgentOps SDK not initialized. Cannot end trace.")

agentops/instrumentation/ag2/instrumentor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ def wrapper(wrapped, instance, args, kwargs):
424424

425425
if tool_type == "function" and isinstance(result, tuple) and len(result) > 0:
426426
success = result[0] if isinstance(result[0], bool) else False
427-
span.set_attribute(ToolAttributes.TOOL_STATUS, "success" if success else "failure")
427+
span.set_attribute(ToolAttributes.TOOL_STATUS, "success" if success else "indeterminate")
428428

429429
if len(result) > 1 and isinstance(result[1], dict):
430430
try:
@@ -435,7 +435,7 @@ def wrapper(wrapped, instance, args, kwargs):
435435
if tool_type == "code" and isinstance(result, tuple) and len(result) >= 3:
436436
exit_code = result[0]
437437
span.set_attribute("exit_code", exit_code)
438-
span.set_attribute(ToolAttributes.TOOL_STATUS, "success" if exit_code == 0 else "failure")
438+
span.set_attribute(ToolAttributes.TOOL_STATUS, "success" if exit_code == 0 else "indeterminate")
439439

440440
if len(result) > 1 and result[1]:
441441
stdout = result[1]

agentops/sdk/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ def end_trace(
389389
390390
Args:
391391
trace_context: The TraceContext object returned by start_trace. If None, ends all active traces.
392-
end_state: The final state of the trace (e.g., "Success", "Failure", "Error").
392+
end_state: The final state of the trace (e.g., "Success", "Indeterminate", "Error").
393393
"""
394394
if not self.initialized:
395395
logger.warning("Global tracer not initialized. Cannot end trace.")

agentops/sdk/decorators/factory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ async def _wrapped_session_async() -> Any:
118118
return result
119119
except Exception:
120120
if trace_context:
121-
tracer.end_trace(trace_context, "Failure")
121+
tracer.end_trace(trace_context, "Indeterminate")
122122
raise
123123
finally:
124124
if trace_context and trace_context.span.is_recording():
@@ -150,7 +150,7 @@ async def _wrapped_session_async() -> Any:
150150
return result
151151
except Exception:
152152
if trace_context:
153-
tracer.end_trace(trace_context, "Failure")
153+
tracer.end_trace(trace_context, "Indeterminate")
154154
raise
155155
finally:
156156
if trace_context and trace_context.span.is_recording():

0 commit comments

Comments
 (0)