Troubleshooting Guide
BothDiagnose and fix common Traccia SDK issues.
This guide helps you diagnose and resolve common issues with the Traccia SDK, from installation problems to missing traces.
Quick Diagnostic Commands
Start with these CLI commands to quickly identify issues:
Step 1: Validate Configuration
traccia doctorChecks for config files, environment variables, validates settings, and reports issues.
Step 2: Test Connectivity
traccia checkTests connectivity to your configured OTLP endpoint.
Step 3: Enable Debug Logging
export TRACCIA_DEBUG=trueEnables detailed logging of SDK operations for debugging.
Common Issues
No traces appearing in backend
Symptom:
SDK runs without errors, but no traces in Jaeger/Grafana/Platform
Diagnosis steps:
- Run
traccia doctorto check config - Verify backend is running:
curl http://localhost:4318/health - Check sample_rate (should be 1.0 for testing)
- Verify auto_start_trace is enabled (default: true)
- Test with console exporter to confirm spans are created
Solutions:
# Test with console output firstfrom traccia import init
init( enable_console_exporter=True, debug=True)
# If traces appear in console but not backend:# 1. Check endpoint URL is correct# 2. Verify backend is accepting OTLP# 3. Run: traccia check --endpoint http://localhost:4318/v1/tracesConnection failed or endpoint unreachable
Symptom:
Errors like "Connection refused", "Endpoint unreachable", or timeouts
Diagnosis steps:
- Check if backend is running:
docker ps(for Jaeger/Tempo) - Verify port is accessible:
telnet localhost 4318 - Check endpoint URL format (e.g.
/v1/tracesfor local OTLP,/v2/tracesfor Traccia platform HTTP) - For gRPC clients, use
https://api.traccia.ai:4317withOTEL_EXPORTER_OTLP_PROTOCOL=grpc— do not append/v2/traces. See Platform OTLP Ingestion - Test with traccia check:
traccia check
Solutions:
# Start Jaeger if not runningdocker run -d --name jaeger \ -p 16686:16686 \ -p 4318:4318 \ jaegertracing/all-in-one:latest
# Verify it's runningcurl http://localhost:4318/
# Configure Tracciaexport TRACCIA_ENDPOINT="http://localhost:4318/v1/traces"traccia checkConfig file not found or ignored
Symptom:
SDK doesn't use your traccia.toml settings
Diagnosis steps:
- Check file exists:
ls traccia.toml - Verify it's in the current directory or
~/.traccia/ - Check TOML syntax:
python -c "import toml; toml.load('traccia.toml')" - Ensure you're calling
init()without overriding all values
Solutions:
# Create config filetraccia config init
# Validate syntaxtraccia doctor
# Explicitly specify config fileexport TRACCIA_CONFIG="/path/to/traccia.toml"python your_app.pyImport errors or missing modules
Symptom:
ModuleNotFoundError for traccia or dependencies
Solutions:
# Verify installationpip list | grep traccia
# Reinstallpip install --force-reinstall traccia
# Check Python version (requires 3.9+)python --version
# Verify you're in the right environmentwhich pythonpip show tracciaAuto-instrumentation not working
Symptom:
OpenAI/Anthropic calls not appearing in traces
Diagnosis:
# Check if patching is enabledfrom traccia import init
init(debug=True) # Should log "Patched OpenAI" messagesSolutions:
- Ensure
enable_patching=True(default) - Call
init()BEFORE importing OpenAI/Anthropic - Check library versions (OpenAI ≥1.0.0, Anthropic ≥0.18.0)
- If still not working, use
@observe()decorator manually
High memory usage or OOM errors
Symptom:
Application memory grows over time or crashes with OOM
Common causes:
- Queue buildup (spans not exporting fast enough)
- Very high span creation rate
- Large attributes or results captured
- Backend unreachable (spans queuing indefinitely)
Solutions:
# Reduce queue size and add rate limitinginit( max_queue_size=1000, # Lower from default 5000 max_spans_per_second=50, # Cap span rate max_block_ms=10, # Drop spans quickly if queue full)
# Skip large results@observe(skip_result=True)def process_large_data(): return huge_dataframe
# Truncate attributesinit(attr_truncation_limit=500) # Truncate at 500 charsStep-by-Step Debugging Workflow
Verify SDK Installation
python -c "import traccia; print(traccia.__version__)"traccia --helpShould print version and show CLI help
Validate Configuration
traccia doctortraccia checkFix any issues reported
Test with Console Exporter
# Switch to console temporarilyinit(enable_console_exporter=True, debug=True)
# Run your agent# You should see JSON output in terminalVerifies instrumentation is working
Check Backend Logs
# Jaeger logsdocker logs jaeger
# Tempo logsdocker-compose logs tempo
# Look for OTLP ingestion errors or rejectionsBackend may show why traces are rejected
Test with File Exporter
# Write to file for inspectioninit( enable_file_exporter=True, file_exporter_path="debug_traces.jsonl")
# After running, inspect the filecat debug_traces.jsonl | jqAllows offline analysis of span structure
Performance Issues
Application is slower after adding Traccia
- • Expected overhead: 50-200 microseconds per span
- • If seeing ms+ overhead: Check for large arguments/results being captured
- • Solution: Use
skip_argsandskip_result=True - • For high-frequency functions: Don't use @observe(), or sample aggressively
Token counting is slow
Token counting adds ~1-5ms per LLM call. If this is unacceptable:
init(enable_token_counting=False)Getting More Help
Still stuck?
- Check the FAQ for common questions
- Review Error Reference for exception details
- Search GitHub issues
- Open a new issue with debug logs and configuration
Next Steps
© 2026 Traccia.