#observability #logging-tracing #logging #api-bindings #rust-fs

rustfs-obs

Observability and monitoring tools for RustFS, providing metrics, logging, and tracing capabilities

1 unstable release

Uses new Rust 2024

0.0.3 Jul 4, 2025

#1429 in Debugging

Apache-2.0

470KB
8K SLoC

RustFS

RustFS Obs - Observability & Monitoring

Comprehensive observability and monitoring solution for RustFS distributed object storage

CI 📖 Documentation · 🐛 Bug Reports · 💬 Discussions


📖 Overview

RustFS Obs provides comprehensive observability and monitoring capabilities for the RustFS distributed object storage system. It includes metrics collection, distributed tracing, logging, alerting, and performance monitoring to ensure optimal system operation and troubleshooting.

Note: This is a critical operational submodule of RustFS that provides essential observability capabilities for the distributed object storage system. For the complete RustFS experience, please visit the main RustFS repository.

✨ Features

📊 Metrics Collection

  • Prometheus Integration: Native Prometheus metrics export
  • Custom Metrics: Application-specific performance metrics
  • System Metrics: CPU, memory, disk, and network monitoring
  • Business Metrics: Storage usage, request rates, and error tracking

🔍 Distributed Tracing

  • OpenTelemetry Support: Standard distributed tracing
  • Request Tracking: End-to-end request lifecycle tracking
  • Performance Analysis: Latency and bottleneck identification
  • Cross-Service Correlation: Trace requests across microservices

📝 Structured Logging

  • JSON Logging: Machine-readable structured logs
  • Log Levels: Configurable log levels and filtering
  • Context Propagation: Request context in all logs
  • Log Aggregation: Centralized log collection support

🚨 Alerting & Notifications

  • Rule-Based Alerts: Configurable alerting rules
  • Multiple Channels: Email, Slack, webhook notifications
  • Alert Escalation: Tiered alerting and escalation policies
  • Alert Correlation: Group related alerts together

📦 Installation

Add this to your Cargo.toml:

[dependencies]
rustfs-obs = "0.0.3"

🔧 Usage

🏗️ Architecture

Observability Architecture

Observability Architecture:
┌─────────────────────────────────────────────────────────────┐
│                    Observability API                        │
├─────────────────────────────────────────────────────────────┤
│   Metrics     │   Tracing     │   Logging    │   Alerting   │
├─────────────────────────────────────────────────────────────┤
│              Data Collection & Processing                    │
├─────────────────────────────────────────────────────────────┤
│  Prometheus   │  OpenTelemetry │  Structured  │  Alert Mgr  │
├─────────────────────────────────────────────────────────────┤
│              External Integrations                          │
└─────────────────────────────────────────────────────────────┘

Monitoring Stack

Component Purpose Integration
Prometheus Metrics storage Pull-based metrics collection
Jaeger Distributed tracing OpenTelemetry traces
Grafana Visualization Dashboards and alerts
ELK Stack Log aggregation Structured log processing

🧪 Testing

Run the test suite:

# Run all tests
cargo test

# Test metrics collection
cargo test metrics

# Test tracing functionality
cargo test tracing

# Test alerting
cargo test alerting

# Integration tests
cargo test --test integration

📋 Requirements

  • Rust: 1.70.0 or later
  • Platforms: Linux, macOS, Windows
  • External Services: Prometheus, Jaeger (optional)
  • Network: HTTP endpoint exposure capability

This module is part of the RustFS ecosystem:

📚 Documentation

For comprehensive documentation, visit:

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

📄 License

Licensed under the Apache License, Version 2.0. See LICENSE for details.


RustFS is a trademark of RustFS, Inc.
All other trademarks are the property of their respective owners.

Made with 📊 by the RustFS Team

Dependencies

~23–45MB
~615K SLoC