Spaces:
Sleeping
Sleeping
File size: 1,629 Bytes
40ee6b4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# Observability Module
"""
Comprehensive observability infrastructure for multi-agent MCTS framework.
Includes:
- JSON structured logging with correlation IDs
- OpenTelemetry tracing with automatic span creation
- Metrics collection for MCTS and agent performance
- Debug utilities for MCTS tree visualization
- Performance profiling tools
"""
from .debug import MCTSDebugger, export_tree_to_dot, visualize_mcts_tree
from .logging import CorrelationIdFilter, get_logger, setup_logging
from .metrics import MetricsCollector, agent_metrics, mcts_metrics
from .profiling import AsyncProfiler, MemoryProfiler, generate_performance_report, profile_block
from .tracing import TracingManager, get_tracer, trace_operation
# Braintrust integration (optional)
try:
from .braintrust_tracker import ( # noqa: F401
BRAINTRUST_AVAILABLE,
BraintrustContextManager,
BraintrustTracker,
create_training_tracker,
)
_braintrust_exports = [
"BraintrustTracker",
"BraintrustContextManager",
"create_training_tracker",
"BRAINTRUST_AVAILABLE",
]
except ImportError:
_braintrust_exports = []
__all__ = [
# Logging
"setup_logging",
"get_logger",
"CorrelationIdFilter",
# Tracing
"TracingManager",
"trace_operation",
"get_tracer",
# Metrics
"MetricsCollector",
"mcts_metrics",
"agent_metrics",
# Debug
"MCTSDebugger",
"export_tree_to_dot",
"visualize_mcts_tree",
# Profiling
"profile_block",
"AsyncProfiler",
"MemoryProfiler",
"generate_performance_report",
] + _braintrust_exports
|