You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/IMPLEMENTATION_PLAN.md
+34-33Lines changed: 34 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
-
# Argus Observability & Performance Improvement Plan
1
+
# OtelContext Observability & Performance Improvement Plan
2
2
3
3
## Context
4
4
5
-
Argus is a self-hosted OTLP observability platform (Go backend + React frontend) that ingests traces, logs, and metrics via gRPC, stores them in a relational DB (SQLite/MySQL/PostgreSQL/MSSQL), and serves dashboards via HTTP/WebSocket. When connected to active services pushing continuous telemetry, the DB will grow unbounded and performance will degrade. The goal is to:
5
+
OtelContext is a self-hosted OTLP observability platform (Go backend + React frontend) that ingests traces, logs, and metrics via gRPC, stores them in a relational DB (SQLite/MySQL/PostgreSQL/MSSQL), and serves dashboards via HTTP/WebSocket. When connected to active services pushing continuous telemetry, the DB will grow unbounded and performance will degrade. The goal is to:
6
6
7
7
1.**Capture all metrics, traces, and logs** — comprehensively but smartly
8
8
2.**Create an AI-consumable system graph API** — structured JSON that any AI agent can query
9
9
3.**Maximize performance** — fix identified bottlenecks, use specialized in-memory DBs as accelerators
10
10
4.**Hot/cold storage tiering** — keep 7 days hot, archive older data to compressed cold storage
11
11
5.**Data compression** — prevent DB blowup from continuous ingestion
12
-
6.**HTTP Streamable MCP Server** — universal AI agent access to Argus tools
12
+
6.**HTTP Streamable MCP Server** — universal AI agent access to OtelContext tools
13
13
14
14
### Storage Architecture Principle
15
15
@@ -54,7 +54,7 @@ Specialized in-memory/embedded databases are used as **processing accelerators**
-**File:**`main.go` — add `grpc.UnaryInterceptor()` to gRPC server
171
-
- Records `argus_grpc_*` metrics per RPC
171
+
- Records `OtelContext_grpc_*` metrics per RPC
172
172
173
173
### 3.4 Runtime metrics goroutine
174
174
-**File:**`main.go` — background goroutine sampling `runtime.MemStats` every 15s
@@ -324,7 +324,7 @@ All internal DBs are **embedded** (compiled into the single binary, no external
324
324
325
325
## Phase 6: HTTP Streamable MCP Server
326
326
327
-
Expose Argus as an MCP (Model Context Protocol) server over HTTP with SSE streaming, so any AI agent (Claude, GPT, Cursor, etc.) can discover and call Argus tools natively — no custom API integration needed.
327
+
Expose OtelContext as an MCP (Model Context Protocol) server over HTTP with SSE streaming, so any AI agent (Claude, GPT, Cursor, etc.) can discover and call OtelContext tools natively — no custom API integration needed.
328
328
329
329
### 6.1 MCP server package
330
330
-**New package:**`internal/mcp/`
@@ -371,7 +371,7 @@ Each tool returns structured content that AI agents can reason over:
371
371
{
372
372
"type": "resource",
373
373
"resource": {
374
-
"uri": "argus://system/graph",
374
+
"uri": "OtelContext://system/graph",
375
375
"mimeType": "application/json",
376
376
"text": "{...system graph JSON...}"
377
377
}
@@ -387,9 +387,9 @@ Each tool returns structured content that AI agents can reason over:
387
387
-**Cache:** MCP tools use the same TTL cache from Phase 1.5
388
388
389
389
### 6.6 MCP Resources (read-only data subscriptions)
390
-
-`argus://system/graph` — live system graph (subscribable)
391
-
-`argus://services/{name}/health` — per-service health
392
-
-`argus://metrics/prometheus` — current Prometheus metrics dump
390
+
-`OtelContext://system/graph` — live system graph (subscribable)
391
+
-`OtelContext://services/{name}/health` — per-service health
392
+
-`OtelContext://metrics/prometheus` — current Prometheus metrics dump
393
393
- AI agents can subscribe to resources for real-time updates via SSE
394
394
395
395
---
@@ -398,7 +398,7 @@ Each tool returns structured content that AI agents can reason over:
398
398
399
399
**Changes delivered:**
400
400
-`internal/ingest/sampler.go`*(new)* — per-service token bucket sampler; always keeps errors, slow traces, new services; configurable via `SAMPLING_RATE`, `SAMPLING_ALWAYS_ON_ERRORS`, `SAMPLING_LATENCY_THRESHOLD_MS`
401
-
-`internal/tsdb/aggregator.go` — `SetCardinalityLimit(max, onOverflow)` routes excess metric series to overflow bucket; increments `argus_tsdb_cardinality_overflow_total`; wired via `METRIC_MAX_CARDINALITY`
401
+
-`internal/tsdb/aggregator.go` — `SetCardinalityLimit(max, onOverflow)` routes excess metric series to overflow bucket; increments `OtelContext_tsdb_cardinality_overflow_total`; wired via `METRIC_MAX_CARDINALITY`
402
402
-`internal/api/ratelimit.go`*(new)* — per-IP token bucket rate limiter; X-Forwarded-For aware; configurable via `API_RATE_LIMIT_RPS`; wraps HTTP handler in `main.go`
403
403
404
404
## Phase 7: Smart Observability
@@ -413,7 +413,7 @@ Each tool returns structured content that AI agents can reason over:
@@ -454,5 +454,6 @@ Each tool returns structured content that AI agents can reason over:
454
454
2.**Metrics:** Verify all new Prometheus metrics appear at `GET /metrics`
455
455
3.**Graph API:** Hit `GET /api/system/graph` during simulation, validate JSON schema
456
456
4.**Archival:** Set `HOT_RETENTION_DAYS=0`, trigger archival, verify cold files created and hot DB shrunk
457
-
5.**Sampling:** Enable sampling, verify reduced ingestion rate via `argus_ingestion_rate` while errors still captured
457
+
5.**Sampling:** Enable sampling, verify reduced ingestion rate via `OtelContext_ingestion_rate` while errors still captured
458
458
6.**MCP Server:**`POST /mcp` with `{"jsonrpc":"2.0","method":"initialize",...}` returns tool list; call `tools/call` with `get_system_graph` returns valid graph; connect from Claude Desktop or any MCP client
0 commit comments