Manual vs Automatic Tracking
Understanding when to use manual tracking versus automatic tracking helps you choose the best approach for your application.
Detailed Comparison
| Feature | Manual Tracking | Automatic Tracking (Wrapper) |
|---|---|---|
| Code Complexity | ~40 lines per API call | ~15 lines total setup |
| Token Counting | Extract from API response | Automatic via wrapper |
| Error Prone | Can forget to track calls | Impossible to miss |
| Flexibility | Full control over data | Standardized tracking |
| Setup Time | 5-10 min per integration | 2 min one-time setup |
| Maintenance | Update code for each call | Zero ongoing maintenance |
| Best For | Custom providers, special cases | OpenAI, Gemini, standard usage |
| Code Reduction | Baseline | ~60% less code |
✓ Use Manual When:
- • Using a provider without automatic wrapper support
- • Want granular control over what's tracked
- • Building custom AI solutions
✓ Use Automatic When:
- • Want minimal code and setup
- • Need reliable, consistent tracking
- • Building standard AI applications (Recommended!)
Recommendation
For most users, automatic tracking is the best choice. It's simpler, more reliable, and easier to maintain. Only use manual tracking if you have specific requirements that automatic tracking doesn't support.
Was this page helpful?
Need help? Contact us at support@withpaygent.com