From Distributed Traces to GPU-Accelerated AIOps: Building a Self-Healing Microservice Architecture (Part 1)
Every single line of Java, SQL, YAML, Dockerfile, and frontend code referenced in this series was entirely generated by Google AI—I did not write a single line of code myself. My role was strictly that of the systems architect: designing the topology, wiring the containers across a hybrid hardware setup, testing edge cases, and diagnosing bottlenecks. Explore the complete source code on GitHub:
- Monitored Microservice & Adaptive UI: github.com/htotapally/geo-time-adaptive-agent
- Autonomous Trace Inspector & Remediation MCP Server: github.com/htotapally/jaeger-aiops-guardian
Modern microservice architectures give engineering teams remarkable agility, but they also turn everyday latency spikes into distributed puzzles. When a downstream third-party API slows down, log lines rarely tell the whole story—instead, delays cascade across virtual threads, database checkpoints, and user-facing Service Level Objectives (SLOs).
In this two-part series, we explore how to move from passive observability to governed, AI-driven incident response:
- Part 1 (This Post): Instrumenting a hybrid neuro-symbolic Spring Boot service with OpenTelemetry and Jaeger, offloading local LLM and embedding inference to an NVIDIA Jetson Orin Nano GPU, and building an autonomous Model Context Protocol (MCP) guardian that detects SLO breaches and trips circuit breakers automatically.
- Part 2 (Coming Next): Building a lightweight Security & AIOps Operations Center from scratch—integrating semantic runbook retrieval via a Milvus RAG store and a Human-on-the-Loop approval console so operators can inspect evidence, approve remediations, and persist structured root-cause memories.
1. The Hybrid Hardware & Container Architecture
Rather than running heavy LLM weights on CPU alongside Docker containers, this architecture splits workloads across two nodes on the local network:
- Primary Host Laptop (64 GB RAM — Docker Desktop): Runs the containerized Spring Boot 3.4+ / Java 21 microservices, Jaeger (OTLP collector and trace query API), PostgreSQL (stateful Human-in-the-Loop checkpoints), and Milvus + Attu (vector storage for semantic city-alias resolution and incident runbooks).
- Dedicated GPU Inference Node (NVIDIA Jetson Orin Nano — 8 GB Unified RAM): Runs Ollama (
dustynv/ollamawith CUDA 12.6) at 100% GPU offload, servingqwen2.5:3b(2.9 GB VRAM) for structured root-cause diagnosis andnomic-embed-text(768-dimensional vectors) for semantic retrieval.
2. How the Telemetry & Remediation Loop Works
Step A: Hybrid Neuro-Symbolic Execution (geo-time-mcp-server, :8083)
The monitored application (geo-time-adaptive-agent) resolves U.S. city queries into verified local times and geographic coordinates. Instead of routing every request through a slow chat loop, it uses a deterministic fast-path in Java 21 virtual threads—falling back to Milvus semantic search (nomic-embed-text) for colloquial city aliases (like "The Big Apple") and PostgreSQL HITL checkpoints when city names are ambiguous (like "Springfield").
Every inbound request and downstream external HTTP call (nominatim.openstreetmap.org and timeapi.io) is instrumented with OpenTelemetry and exported over OTLP (:4318) directly to Jaeger (:16686).
Step B: Catching a Real SLO Breach in Jaeger
Our operational SLO defines any /api/geo-time/query trace exceeding 800 ms as degraded. Below is the Jaeger span breakdown captured during testing (1.02s total duration across 12 spans):
459eed2edf029bfc8a36ac609145caf1) showing a 1,024 ms request breaching the 800 ms SLO due to combined external geocoding and time-zone API latency.Looking at the span breakdown immediately isolates why the request crossed our 800 ms threshold:
- Local Milvus + Jetson Embedding Lookup (
resolve-city-alias→milvus query→embedding): Completed in just~40 ms. - Upstream Geocoding (
lookup-location): Took~468 ms. - Downstream Time-Zone API (
get-time-zone): Stretched out another~386 msat the tail end of the waterfall, pushing total end-to-end latency to1,024 ms.
Step C: Autonomous Diagnosis & Remediation (jaeger-aiops-guardian, :8084)
Instead of waiting for a human engineer to manually click through Jaeger waterfalls at 2:00 AM, jaeger-aiops-guardian exposes Jaeger's trace API and service admin endpoints as Spring AI MCP tools (inspectServiceTraces and executeServiceRemediation):
- Trace Inspection:
AutonomousFleetObserverqueries Jaeger for traces exceeding800 msongeo-time-mcp-server. - GPU Root-Cause Diagnosis: The slow spans are serialized and sent over the LAN to
qwen2.5:3brunning at 100% GPU on the Jetson Orin Nano, which identifiestimeapias the root-cause component and selectsOPEN_CIRCUIT_BREAKER. - Standardized Remediation:
jaeger-aiops-guardianinvokesPOST /api/admin/remediateongeo-time-mcp-server, immediately tripping the circuit breaker:
Executed OPEN_CIRCUIT_BREAKER on geo-time-mcp-server (timeapi): {"status":"APPLIED","component":"timeapi","circuitOpen":true}
The moment OPEN_CIRCUIT_BREAKER flipped circuitOpen to true on timeapi, geo-time-mcp-server stopped blocking virtual threads on slow external HTTP calls to timeapi.io and switched seamlessly to deterministic local IANA timezone resolution (java.time.ZoneId):
timeapi.io Span- Zero User Disruption: End users continued receiving accurate, verified local time cards with zero failed requests.
- Cascading Failure Prevention: Short-circuiting the degraded external dependency eliminated tail-latency amplification across concurrent virtual threads.
- Closed-Loop Verification: Subsequent health scans by
jaeger-aiops-guardianconfirmed traces dropped back well below the800 msSLO threshold.
3. What's Next in Part 2: Building a Lightweight Security & AIOps Operations Center
Blindly auto-remediating every anomaly works for safe, reversible actions like tripping a circuit breaker on a flaky external API—but high-impact changes require policy gates, institutional runbook knowledge, and human sign-off.
In Part 2, we will build a lightweight Security & AIOps Operations Center (:8085) from scratch to replace heavy, complex enterprise scaffolding with a transparent, self-hosted governance engine:
- Semantic Runbook & Incident Memory (
milvus-memory-broker,:8080): Grounding LLM recommendations in PDF operational manuals and past post-mortems stored in Milvus. - Policy-Driven Human-on-the-Loop Console (
:8085): Pausing high-risk actions so an operator can review Jaeger spans, Milvus runbook citations, and Jetson GPU reasoning before clicking Approve or Reject.

No comments:
Post a Comment