|
| 1 | +# Release v0.9.15 - Production Observability |
| 2 | + |
| 3 | +**Release Date**: 2026-02-04 |
| 4 | +**Git Tag**: `v0.9.15` |
| 5 | +**Commit**: `6bcc9d4` |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## Overview |
| 10 | + |
| 11 | +Major release adding enterprise-grade observability for production deployments with Prometheus metrics, health endpoints, and structured logging. |
| 12 | + |
| 13 | +--- |
| 14 | + |
| 15 | +## 🚀 What's New |
| 16 | + |
| 17 | +### 1. Structured Logging |
| 18 | + |
| 19 | +Production-ready JSON logging for log aggregation systems (ELK, Datadog, Splunk): |
| 20 | + |
| 21 | +```bash |
| 22 | +# JSON format for production |
| 23 | +weave --log-format json --log-level info docs ls MyDocs |
| 24 | + |
| 25 | +# Text format for CLI (colored, human-readable) |
| 26 | +weave --log-format text --log-level debug docs ls MyDocs |
| 27 | + |
| 28 | +# Write to file |
| 29 | +weave --log-file /var/log/weave.log docs ls MyDocs |
| 30 | +``` |
| 31 | + |
| 32 | +**Features**: |
| 33 | +- JSON format with RFC3339 timestamps |
| 34 | +- Structured fields: `vdb_type`, `operation`, `collection`, `document_id` |
| 35 | +- Log levels: `debug`, `info`, `warn`, `error` |
| 36 | +- Helper functions: `WithVDB()`, `WithCollection()`, `WithDocument()` |
| 37 | + |
| 38 | +**Example JSON output**: |
| 39 | +```json |
| 40 | +{ |
| 41 | + "level": "info", |
| 42 | + "time": "2026-02-04T10:00:00Z", |
| 43 | + "message": "Document created successfully", |
| 44 | + "vdb_type": "milvus", |
| 45 | + "collection": "AuctionListings", |
| 46 | + "document_id": "auction-12345" |
| 47 | +} |
| 48 | +``` |
| 49 | + |
| 50 | +### 2. Prometheus Metrics |
| 51 | + |
| 52 | +Full Prometheus integration with 4 core metrics: |
| 53 | + |
| 54 | +```bash |
| 55 | +# Enable metrics server |
| 56 | +weave --metrics docs ls MyDocs |
| 57 | + |
| 58 | +# Custom port |
| 59 | +weave --metrics --metrics-port 8080 docs ls MyDocs |
| 60 | + |
| 61 | +# Access metrics |
| 62 | +curl http://localhost:9090/metrics |
| 63 | +``` |
| 64 | + |
| 65 | +**Metrics Available**: |
| 66 | + |
| 67 | +1. **Request Duration** (Histogram): |
| 68 | + ```prometheus |
| 69 | + weave_request_duration_seconds_bucket{vdb_type="milvus",operation="ListCollections",status="success",le="0.1"} 150 |
| 70 | + ``` |
| 71 | + |
| 72 | +2. **Document Count** (Counter): |
| 73 | + ```prometheus |
| 74 | + weave_documents_total{vdb_type="milvus",operation="create"} 1523 |
| 75 | + ``` |
| 76 | + |
| 77 | +3. **Error Count** (Counter): |
| 78 | + ```prometheus |
| 79 | + weave_errors_total{vdb_type="milvus",operation="CreateDocument",error_type="timeout"} 5 |
| 80 | + ``` |
| 81 | + |
| 82 | +4. **Active Connections** (Gauge): |
| 83 | + ```prometheus |
| 84 | + weave_active_connections{vdb_type="milvus"} 5 |
| 85 | + ``` |
| 86 | + |
| 87 | +**Performance**: ~2% overhead when enabled, zero overhead when disabled |
| 88 | + |
| 89 | +### 3. Health Endpoints |
| 90 | + |
| 91 | +Kubernetes-ready health checks: |
| 92 | + |
| 93 | +```bash |
| 94 | +# Start with metrics enabled |
| 95 | +weave --metrics docs ls MyDocs |
| 96 | + |
| 97 | +# Check endpoints |
| 98 | +curl http://localhost:9090/healthz # Liveness probe |
| 99 | +curl http://localhost:9090/readyz # Readiness probe |
| 100 | +``` |
| 101 | + |
| 102 | +**Response Example**: |
| 103 | +```json |
| 104 | +{ |
| 105 | + "status": "healthy", |
| 106 | + "timestamp": 1738612800, |
| 107 | + "version": "0.9.15", |
| 108 | + "databases": { |
| 109 | + "milvus-local": "healthy", |
| 110 | + "qdrant-cloud": "healthy" |
| 111 | + } |
| 112 | +} |
| 113 | +``` |
| 114 | + |
| 115 | +**Endpoints**: |
| 116 | +- `/healthz`: Liveness probe (tolerates partial degradation, returns 200 if any DB is healthy) |
| 117 | +- `/readyz`: Readiness probe (strict, returns 200 only if ALL DBs are healthy) |
| 118 | + |
| 119 | +### 4. Persistent Metrics Server (NEW!) |
| 120 | + |
| 121 | +Long-running server for production deployments: |
| 122 | + |
| 123 | +```bash |
| 124 | +# Start persistent server |
| 125 | +weave serve |
| 126 | + |
| 127 | +# With custom config |
| 128 | +weave serve --metrics-port 8080 --log-format json --log-file /var/log/weave.log |
| 129 | +``` |
| 130 | + |
| 131 | +**Features**: |
| 132 | +- Runs until interrupted (Ctrl+C, SIGTERM, SIGINT) |
| 133 | +- Graceful shutdown with 10s timeout |
| 134 | +- Exposes `/metrics`, `/healthz`, `/readyz` persistently |
| 135 | +- Perfect for Docker containers and Kubernetes pods |
| 136 | + |
| 137 | +### 5. Comprehensive Documentation |
| 138 | + |
| 139 | +**New Documentation**: |
| 140 | + |
| 141 | +1. **[OBSERVABILITY.md](../OBSERVABILITY.md)** (700+ lines): |
| 142 | + - Structured logging guide |
| 143 | + - Prometheus metrics with PromQL examples |
| 144 | + - Kubernetes manifests (Deployment, Service, ServiceMonitor) |
| 145 | + - Grafana dashboard examples |
| 146 | + - Prometheus alerting rules |
| 147 | + - Log aggregation setup (ELK, Datadog, Splunk) |
| 148 | + |
| 149 | +2. **[WEAVE_MCP.md](../WEAVE_MCP.md)** (MCP Integration Roadmap): |
| 150 | + - Gap analysis: 8 new tools, 8 tool updates |
| 151 | + - 5-week implementation plan |
| 152 | + - Tool specifications with examples |
| 153 | + |
| 154 | +**Updated Documentation**: |
| 155 | +- **USER_GUIDE.md**: New observability section |
| 156 | +- **README.md**: Updated with observability features |
| 157 | + |
| 158 | +--- |
| 159 | + |
| 160 | +## 📊 Kubernetes Integration |
| 161 | + |
| 162 | +### Deployment Example |
| 163 | + |
| 164 | +```yaml |
| 165 | +apiVersion: apps/v1 |
| 166 | +kind: Deployment |
| 167 | +metadata: |
| 168 | + name: weave-cli |
| 169 | +spec: |
| 170 | + template: |
| 171 | + spec: |
| 172 | + containers: |
| 173 | + - name: weave |
| 174 | + image: weave-cli:0.9.15 |
| 175 | + command: ["weave", "serve"] |
| 176 | + args: |
| 177 | + - --metrics-port=9090 |
| 178 | + - --log-format=json |
| 179 | + ports: |
| 180 | + - containerPort: 9090 |
| 181 | + name: metrics |
| 182 | + |
| 183 | + # Liveness probe |
| 184 | + livenessProbe: |
| 185 | + httpGet: |
| 186 | + path: /healthz |
| 187 | + port: 9090 |
| 188 | + initialDelaySeconds: 30 |
| 189 | + periodSeconds: 30 |
| 190 | + |
| 191 | + # Readiness probe |
| 192 | + readinessProbe: |
| 193 | + httpGet: |
| 194 | + path: /readyz |
| 195 | + port: 9090 |
| 196 | + initialDelaySeconds: 10 |
| 197 | + periodSeconds: 10 |
| 198 | +``` |
| 199 | +
|
| 200 | +### Prometheus ServiceMonitor |
| 201 | +
|
| 202 | +```yaml |
| 203 | +apiVersion: monitoring.coreos.com/v1 |
| 204 | +kind: ServiceMonitor |
| 205 | +metadata: |
| 206 | + name: weave-cli |
| 207 | +spec: |
| 208 | + selector: |
| 209 | + matchLabels: |
| 210 | + app: weave-cli |
| 211 | + endpoints: |
| 212 | + - port: metrics |
| 213 | + interval: 30s |
| 214 | + path: /metrics |
| 215 | +``` |
| 216 | +
|
| 217 | +--- |
| 218 | +
|
| 219 | +## 💡 Usage Examples |
| 220 | +
|
| 221 | +### Production Full Stack |
| 222 | +
|
| 223 | +```bash |
| 224 | +weave \ |
| 225 | + --log-format json \ |
| 226 | + --log-level info \ |
| 227 | + --log-file /var/log/weave.log \ |
| 228 | + --metrics \ |
| 229 | + --metrics-port 9090 \ |
| 230 | + docs ls AuctionListings |
| 231 | +``` |
| 232 | + |
| 233 | +### Development Debugging |
| 234 | + |
| 235 | +```bash |
| 236 | +weave \ |
| 237 | + --log-format text \ |
| 238 | + --log-level debug \ |
| 239 | + docs create MyDocs document.pdf |
| 240 | +``` |
| 241 | + |
| 242 | +### Production Server |
| 243 | + |
| 244 | +```bash |
| 245 | +# Run as daemon/service |
| 246 | +weave serve \ |
| 247 | + --metrics-port 9090 \ |
| 248 | + --log-format json \ |
| 249 | + --log-file /var/log/weave.log |
| 250 | +``` |
| 251 | + |
| 252 | +--- |
| 253 | + |
| 254 | +## 📈 Performance Impact |
| 255 | + |
| 256 | +| Feature | Overhead | Notes | |
| 257 | +|---------|----------|-------| |
| 258 | +| Structured Logging (JSON) | ~5% | vs text format | |
| 259 | +| Prometheus Metrics | ~2% | when enabled | |
| 260 | +| Health Endpoints | <1ms | per check | |
| 261 | +| Overall | <5% | recommended for production | |
| 262 | + |
| 263 | +--- |
| 264 | + |
| 265 | +## 🔧 Technical Details |
| 266 | + |
| 267 | +### Dependencies Added |
| 268 | + |
| 269 | +- `github.com/prometheus/client_golang` v1.23.2 |
| 270 | + |
| 271 | +### Files Changed |
| 272 | + |
| 273 | +- **Code**: 8 files (logging, metrics, health, server, serve command) |
| 274 | +- **Docs**: 5 files (OBSERVABILITY.md, WEAVE_MCP.md, USER_GUIDE.md, README.md, CHANGELOG.md) |
| 275 | +- **Total Lines**: ~2,600 added |
| 276 | + |
| 277 | +### VDB Instrumentation |
| 278 | + |
| 279 | +**Milvus adapter** instrumented with structured logging and metrics: |
| 280 | +- `ListCollections`: Duration tracking, error logging |
| 281 | +- `CreateDocument`: Document context logging, metrics recording |
| 282 | + |
| 283 | +More VDB adapters will be instrumented in future releases. |
| 284 | + |
| 285 | +--- |
| 286 | + |
| 287 | +## 🆙 Upgrading from v0.9.12 |
| 288 | + |
| 289 | +### Breaking Changes |
| 290 | + |
| 291 | +**None** - fully backward compatible! |
| 292 | + |
| 293 | +### New Features (Opt-in) |
| 294 | + |
| 295 | +All observability features are opt-in and disabled by default: |
| 296 | +- Structured logging requires `--log-format json` |
| 297 | +- Metrics require `--metrics` flag |
| 298 | +- Health endpoints only available when metrics enabled |
| 299 | + |
| 300 | +### Migration Guide |
| 301 | + |
| 302 | +**No migration needed** - existing commands work unchanged: |
| 303 | + |
| 304 | +```bash |
| 305 | +# Still works exactly the same |
| 306 | +weave docs ls MyDocs |
| 307 | + |
| 308 | +# Add observability when ready |
| 309 | +weave --log-format json --metrics docs ls MyDocs |
| 310 | +``` |
| 311 | + |
| 312 | +--- |
| 313 | + |
| 314 | +## 📋 Release Checklist |
| 315 | + |
| 316 | +- ✅ All features implemented and tested |
| 317 | +- ✅ Documentation complete (700+ lines) |
| 318 | +- ✅ Unit tests passing |
| 319 | +- ✅ Integration tests passing |
| 320 | +- ✅ Linter checks passing |
| 321 | +- ✅ CHANGELOG.md updated |
| 322 | +- ✅ README.md updated |
| 323 | +- ✅ Git tag created (`v0.9.15`) |
| 324 | +- ✅ Binary built and verified |
| 325 | + |
| 326 | +--- |
| 327 | + |
| 328 | +## 🐛 Bug Fixes |
| 329 | + |
| 330 | +None in this release (feature-focused release). |
| 331 | + |
| 332 | +--- |
| 333 | + |
| 334 | +## 🔮 What's Next (v0.9.16+) |
| 335 | + |
| 336 | +Based on the production hardening roadmap: |
| 337 | + |
| 338 | +1. **Performance Enhancements** (v0.9.16): |
| 339 | + - Connection pooling for VDB clients |
| 340 | + - Embedding cache (90% cost reduction) |
| 341 | + - Concurrent query execution |
| 342 | + - Batch optimization |
| 343 | + |
| 344 | +2. **Security Hardening** (v0.9.17): |
| 345 | + - OAuth2 support for cloud VDBs |
| 346 | + - Secrets management improvements |
| 347 | + - TLS configuration enhancements |
| 348 | + |
| 349 | +3. **Operations** (v0.9.18): |
| 350 | + - Graceful shutdown for all operations |
| 351 | + - Circuit breakers for resilience |
| 352 | + - Rate limiting |
| 353 | + - Backup/restore commands |
| 354 | + |
| 355 | +See [Production Hardening Plan](../planning/PRODUCTION_HARDENING_2026-02-03.md) for details. |
| 356 | + |
| 357 | +--- |
| 358 | + |
| 359 | +## 🙏 Contributors |
| 360 | + |
| 361 | +- **@maximilien** - Production hardening implementation |
| 362 | +- **Claude Code** - Development assistance |
| 363 | + |
| 364 | +--- |
| 365 | + |
| 366 | +## 📚 Resources |
| 367 | + |
| 368 | +- **Documentation**: [docs/OBSERVABILITY.md](../OBSERVABILITY.md) |
| 369 | +- **User Guide**: [docs/USER_GUIDE.md](../USER_GUIDE.md) |
| 370 | +- **MCP Roadmap**: [docs/WEAVE_MCP.md](../WEAVE_MCP.md) |
| 371 | +- **Changelog**: [CHANGELOG.md](../../CHANGELOG.md) |
| 372 | + |
| 373 | +--- |
| 374 | + |
| 375 | +## 🚀 Get Started |
| 376 | + |
| 377 | +```bash |
| 378 | +# Clone and build |
| 379 | +git clone https://github.com/maximilien/weave-cli.git |
| 380 | +cd weave-cli |
| 381 | +git checkout v0.9.15 |
| 382 | +./build.sh |
| 383 | + |
| 384 | +# Verify version |
| 385 | +./bin/weave --version |
| 386 | + |
| 387 | +# Try observability features |
| 388 | +./bin/weave --log-format json --metrics docs ls MyDocs |
| 389 | + |
| 390 | +# Start production server |
| 391 | +./bin/weave serve --metrics-port 9090 |
| 392 | +``` |
| 393 | + |
| 394 | +--- |
| 395 | + |
| 396 | +**Weave-cli v0.9.15 - Production Ready! 🎉** |
0 commit comments