From c3560fdd637c4f034cac4f7371aeed65d018bc91 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Wed, 1 Apr 2026 16:12:40 +0900 Subject: feat(services): integrate structlog, healthcheck, metrics, and Telegram Replace logging.basicConfig/getLogger with structlog setup_logging in all four service entry points. Add HealthCheckServer, ServiceMetrics, and TelegramNotifier initialization to each service. Update OrderExecutor to accept a notifier parameter and send order notifications. Add RedisBroker.ping() for health checks. Update executor tests with notifier=AsyncMock(). --- services/order-executor/tests/test_executor.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'services/order-executor/tests/test_executor.py') diff --git a/services/order-executor/tests/test_executor.py b/services/order-executor/tests/test_executor.py index 5b18992..4836ffb 100644 --- a/services/order-executor/tests/test_executor.py +++ b/services/order-executor/tests/test_executor.py @@ -58,6 +58,7 @@ async def test_executor_places_order_when_risk_passes(): risk_manager=risk_manager, broker=broker, db=db, + notifier=AsyncMock(), dry_run=False, ) @@ -84,6 +85,7 @@ async def test_executor_rejects_when_risk_fails(): risk_manager=risk_manager, broker=broker, db=db, + notifier=AsyncMock(), dry_run=False, ) @@ -109,6 +111,7 @@ async def test_executor_dry_run_does_not_call_exchange(): risk_manager=risk_manager, broker=broker, db=db, + notifier=AsyncMock(), dry_run=True, ) -- cgit v1.2.3