🔥 Graphyne
A blazingly fast, ergonomic Rust client for sending metrics to Graphite Carbon daemons.
✨ Features
- 🎯 Simple API - Intuitive builder pattern for easy configuration
- 🔄 Auto-reconnection - Automatic retry logic with configurable attempts
- ⚡ Zero-copy writes - Efficient metric transmission with minimal overhead
- 🛡️ Type-safe - Leverages Rust's type system for compile-time guarantees
- ⏱️ Configurable timeouts - Fine-grained control over connection behavior
- 📊 Real-time metrics - Unix timestamp generation for accurate time-series data
🚀 Quick Start
Add Graphyne to your project:
📖 Usage
Basic Example
use ;
// Create a client with default settings
let mut client = builder
.address
.port
.build?;
// Send a metric
let message = new;
client.send_message?;
Advanced Configuration
use GraphiteClient;
use Duration;
let mut client = builder
.address
.port
.retries // Optional
.timeout // Optional
.build?;
Sending Multiple Metrics
use ;
let mut client = builder
.address
.port
.build?;
// Send various application metrics
let metrics = vec!;
for metric in &metrics
Connection Behavior
- Automatic reconnection: If a send fails, the client automatically attempts to reconnect
- Retry logic: Configurable number of retry attempts for both connection and send operations
- Graceful shutdown: Connections are properly closed when the client is dropped
⚠️ Known Limitations
- IP addresses only: Currently only supports IP addresses, not DNS hostnames
- TCP only: Uses TCP plaintext protocol (port 2003 by default)
- No UDP support: UDP protocol is not yet supported
- No batching: Each message is sent individually
🤝 Contributing
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Development
# Run tests
# Check formatting
# Run clippy
📜 License
Licensed under the Apache License, Version 2.0. See LICENSE for details.
🙏 Acknowledgments
Built with ❤️ by the Vultr Core Cloud Engineering team.
📚 Additional Resources
Made with 🦀 Rust | Maintained by Vultr