Telemetry & Observability Documentation¶
Complete documentation for AgentiCraft's telemetry and observability features.
📚 Documentation Index¶
Getting Started¶
- Overview - This page provides an overview and quick start guide for telemetry features
- Quick setup examples
- Core concepts (spans, traces, metrics)
- Basic configuration
- Auto-instrumentation overview
Reference Documentation¶
- API Reference - Complete API documentation
- Core classes and methods
- Tracing API details
- Metrics API details
- Decorators and helpers
-
Code examples for each API
-
Metrics Reference - Comprehensive metrics catalog
- All automatic metrics
- Metric naming conventions
- Custom metric creation
- Prometheus queries
- Grafana dashboard examples
Configuration & Deployment¶
- Configuration Guide - Detailed configuration options
- All configuration parameters
- Environment variables
- Configuration files
- Environment-specific setups
-
Security configuration
-
Integration Guide - Platform integration instructions
- Jaeger setup
- Grafana + Prometheus
- DataDog, New Relic, AWS X-Ray
- Azure Monitor, Google Cloud Trace
- Elastic APM
-
Custom collectors
-
Performance Guide - Optimization and tuning
- Performance benchmarks
- Sampling strategies
- Memory management
- Production configurations
-
Troubleshooting guide
-
Troubleshooting Guide - Common issues and solutions
- Installation and dependencies
- Import errors and fixes
- Configuration issues
- Performance problems
- Debugging steps
🚀 Quick Links¶
For Developers¶
- Start with this overview page for quick setup
- Use the API Reference while coding
- Check Performance Guide before production
For DevOps/SRE¶
- Review Configuration Guide for deployment
- Follow Integration Guide for your platform
- Set up alerts using Metrics Reference
For Monitoring Teams¶
- Import Grafana dashboards from
/agenticraft/telemetry/grafana_dashboard.json
- Configure Prometheus using examples in Integration Guide
- Set up alerts based on Metrics Reference
📊 Feature Status¶
Component | Implementation | Tests | Documentation | Examples |
---|---|---|---|---|
Core Telemetry | ✅ Complete | ✅ 95%+ | ✅ Complete | ✅ 5 examples |
OpenTelemetry Integration | ✅ Complete | ✅ Complete | ✅ Complete | ✅ Complete |
Console Exporter | ✅ Complete | ✅ Complete | ✅ Complete | ✅ Complete |
OTLP Exporter | ✅ Complete | ✅ Complete | ✅ Complete | ✅ Complete |
Prometheus Exporter | ✅ Complete | ✅ Complete | ✅ Complete | ✅ Complete |
Auto-instrumentation | ✅ Complete | ✅ Complete | ✅ Complete | ✅ Complete |
Grafana Dashboard | ✅ Complete | N/A | ✅ Complete | ✅ Included |
📝 Examples¶
All telemetry examples are located in /examples/telemetry/
:
- basic_telemetry.py - Simple telemetry setup and usage
- otlp_jaeger_example.py - Jaeger integration with distributed tracing
- prometheus_metrics.py - Metrics endpoint and Prometheus setup
- custom_instrumentation.py - Creating custom spans and metrics
- performance_monitoring.py - Performance analysis and optimization
🔧 Configuration Templates¶
Development¶
telemetry = TelemetryConfig(
enabled=True,
exporter_type="console",
console_pretty_print=True,
sample_rate=1.0
)
Production¶
telemetry = TelemetryConfig(
enabled=True,
exporter_type="otlp",
otlp_endpoint="telemetry.company.com:4317",
sample_rate=0.1,
batch_size=2048,
otlp_compression="gzip"
)
🎯 Common Tasks¶
Enable Telemetry¶
from agenticraft.telemetry import TelemetryConfig
telemetry = TelemetryConfig(enabled=True)
telemetry.initialize()
Add Custom Metrics¶
from agenticraft.telemetry import create_counter
counter = create_counter("custom.operations")
counter.add(1, {"operation": "process"})
Create Custom Spans¶
from agenticraft.telemetry import create_span
with create_span("custom.operation") as span:
span.set_attribute("custom.value", 42)
# Your code here
Export to Jaeger¶
🆘 Support¶
For telemetry-related questions:
- Check the Troubleshooting sections in each guide
- Review example code for working implementations
- Enable debug mode:
TelemetryConfig(debug=True)
- Check AgentiCraft logs for telemetry-related messages
📈 What's Next?¶
The telemetry system is fully implemented and production-ready. Future enhancements may include:
- Additional exporters (Zipkin, AWS X-Ray native)
- Advanced sampling strategies
- Built-in anomaly detection
- Automatic performance optimization
- Enhanced security features
Last Updated: June 2025 | AgentiCraft Version: 0.2.0-alpha