agnt5 0.2.8a5__cp310-abi3-macosx_10_12_x86_64.whl → 0.2.8a8__cp310-abi3-macosx_10_12_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of agnt5 might be problematic. Click here for more details.
- agnt5/_core.abi3.so +0 -0
- agnt5/_telemetry.py +19 -4
- agnt5/agent.py +771 -197
- agnt5/client.py +18 -1
- agnt5/context.py +94 -0
- agnt5/exceptions.py +13 -0
- agnt5/function.py +18 -11
- agnt5/lm.py +124 -16
- agnt5/tool.py +110 -29
- agnt5/worker.py +430 -59
- agnt5/workflow.py +367 -72
- {agnt5-0.2.8a5.dist-info → agnt5-0.2.8a8.dist-info}/METADATA +1 -1
- agnt5-0.2.8a8.dist-info/RECORD +22 -0
- agnt5-0.2.8a5.dist-info/RECORD +0 -22
- {agnt5-0.2.8a5.dist-info → agnt5-0.2.8a8.dist-info}/WHEEL +0 -0
agnt5/_core.abi3.so
CHANGED
|
Binary file
|
agnt5/_telemetry.py
CHANGED
|
@@ -69,14 +69,26 @@ class OpenTelemetryHandler(logging.Handler):
|
|
|
69
69
|
|
|
70
70
|
# Include exception traceback if present (from logger.exception() or exc_info=True)
|
|
71
71
|
if record.exc_info:
|
|
72
|
-
#
|
|
73
|
-
|
|
72
|
+
# Use formatter to format the exception, or fall back to basic formatting
|
|
73
|
+
if self.formatter:
|
|
74
|
+
exc_text = self.formatter.formatException(record.exc_info)
|
|
75
|
+
else:
|
|
76
|
+
# Fallback: use basic traceback formatting
|
|
77
|
+
import traceback
|
|
78
|
+
exc_text = ''.join(traceback.format_exception(*record.exc_info))
|
|
74
79
|
message = f"{message}\n{exc_text}"
|
|
75
80
|
|
|
81
|
+
# Extract correlation IDs from LogRecord attributes (added by _CorrelationFilter)
|
|
82
|
+
# These ensure logs can be correlated with distributed traces in observability backends
|
|
83
|
+
trace_id = getattr(record, 'trace_id', None)
|
|
84
|
+
span_id = getattr(record, 'span_id', None)
|
|
85
|
+
run_id = getattr(record, 'run_id', None)
|
|
86
|
+
|
|
76
87
|
# Forward to Rust tracing system
|
|
77
88
|
# Rust side will:
|
|
78
89
|
# - Add to current span context (inherits invocation.id)
|
|
79
|
-
# -
|
|
90
|
+
# - Attach correlation IDs as span attributes for OTLP export
|
|
91
|
+
# - Send to OTLP exporter with trace context
|
|
80
92
|
# - Print to console via fmt layer
|
|
81
93
|
self._log_from_python(
|
|
82
94
|
level=record.levelname,
|
|
@@ -84,7 +96,10 @@ class OpenTelemetryHandler(logging.Handler):
|
|
|
84
96
|
target=record.name,
|
|
85
97
|
module_path=record.module,
|
|
86
98
|
filename=record.pathname,
|
|
87
|
-
line=record.lineno
|
|
99
|
+
line=record.lineno,
|
|
100
|
+
trace_id=trace_id,
|
|
101
|
+
span_id=span_id,
|
|
102
|
+
run_id=run_id,
|
|
88
103
|
)
|
|
89
104
|
except Exception:
|
|
90
105
|
# Don't let logging errors crash the application
|