Overview
HoneyHive supports multiple tracer instances in a single application. Each instance maintains its own session context, configuration, and OTelTracerProvider. Instances do not share context.
Use Cases
Environment-Based Routing
Route traces to different projects based on environment:Multi-Tenant SaaS
Each tenant gets their own tracer with isolated context:A/B Testing
Run different configurations side-by-side with separate tracers:Feature Isolation
Route different features to different projects:Per-Request Initialization
For full isolation, initialize a tracer per request:Thread Safety
HoneyHive uses Python’scontextvars for thread safety. When using thread pools, propagate context explicitly:
Best Practices
- Keep tracer instances in a central registry - create once, reuse many times
- Use consistent naming conventions (
{app}-{environment}) - Use environment variables for API keys, never hard-code them
- Use metadata to differentiate when possible, rather than creating additional tracers
- 2-5 tracers per application is typical and performant
Performance
| Metric | Impact |
|---|---|
| Memory | ~100KB per tracer instance |
| Network | Batched, async export per tracer |
| Span Processing | Each tracer has its own processor |

