profit 8c6e7831e9 Add Phase 10-12 implementation: multi-tenant, marketplace, observability
Major additions:
- marketplace/: Agent template registry with FTS5 search, ratings, versioning
- observability/: Prometheus metrics, distributed tracing, structured logging
- ledger/migrations/: Database migration scripts for multi-tenant support
- tests/governance/: 15 new test files for phases 6-12 (295 total tests)
- bin/validate-phases: Full 12-phase validation script

New features:
- Multi-tenant support with tenant isolation and quota enforcement
- Agent marketplace with semantic versioning and search
- Observability with metrics, tracing, and log correlation
- Tier-1 agent bootstrap scripts

Updated components:
- ledger/api.py: Extended API for tenants, marketplace, observability
- ledger/schema.sql: Added tenant, project, marketplace tables
- testing/framework.ts: Enhanced test framework
- checkpoint/checkpoint.py: Improved checkpoint management

Archived:
- External integrations (Slack/GitHub/PagerDuty) moved to .archive/
- Old checkpoint files cleaned up

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 18:39:47 -05:00

74 lines
1.4 KiB
Python

"""
Observability Module
====================
Provides metrics, tracing, and logging for the agent governance system.
Components:
- metrics: Prometheus-format metrics endpoint
- tracing: Distributed tracing with spans
- logging: Structured JSON logging with trace correlation
"""
from .metrics import (
registry,
router as metrics_router,
record_agent_execution,
record_violation,
record_promotion,
record_orchestration,
record_template_download,
MetricsMiddleware
)
from .tracing import (
Tracer,
Span,
Trace,
get_tracer,
get_current_trace_id,
get_current_span,
router as tracing_router,
TRACE_ID_HEADER,
SPAN_ID_HEADER,
extract_trace_context,
inject_trace_context
)
from .logging import (
get_logger,
StructuredLogger,
LogStorage,
router as logging_router
)
__all__ = [
# Metrics
'registry',
'metrics_router',
'record_agent_execution',
'record_violation',
'record_promotion',
'record_orchestration',
'record_template_download',
'MetricsMiddleware',
# Tracing
'Tracer',
'Span',
'Trace',
'get_tracer',
'get_current_trace_id',
'get_current_span',
'tracing_router',
'TRACE_ID_HEADER',
'SPAN_ID_HEADER',
'extract_trace_context',
'inject_trace_context',
# Logging
'get_logger',
'StructuredLogger',
'LogStorage',
'logging_router'
]