Common Errors Reference
Enabling Verbose Logging
The SDK includes built-in verbose logging that surfaces debug-level detail about tracer initialization, span processing, OTLP export, and session management. Enable it when you need to diagnose initialization failures, missing spans, or unexpected SDK behavior.- Init parameter
- Environment variable
WARNING to DEBUG and writes structured JSON lines to stdout. You will see entries covering:
- Tracer initialization - configuration resolution, OTLP exporter setup, instrumentor registration
- Span processing - attribute extraction, event type inference, sensitive-attribute filtering
- Session management - session ID generation and validation
- OTLP export - batch flushing, export success/failure, timeout handling
- Git metadata - repository detection and commit info collection
Example output
honeyhive namespace, and the exact logger name is an internal detail that varies by which SDK component emitted the record, so filter on honeyhive rather than on a specific suffix. Any structured context attached to a record is merged into the same JSON object alongside message.
SSL/Certificate Issues
Certificate Validation Failure
Symptom:SSLError: [SSL: CERTIFICATE_VERIFY_FAILED]
Solutions:
- Use system certificates:
- Provide custom CA certificate:
- Disable verification (development only):
Self-Signed Certificate
For on-premise deployments:Proxy Configuration
HTTP/HTTPS Proxy
Authenticated Proxy
Proxy with Custom CA
Bypassing Proxy
Timeout Handling
Connection Timeouts
Symptom:ConnectionError: Connection timed out
Solutions:
- Increase timeout:
-
Use batched async export (default):
By default (
disable_batch=False), spans are exported asynchronously in a background thread.span.end()returns immediately and spans are sent in batches, so export latency does not block your application.
- Disable batching for serverless:
Read Timeouts
Symptom:ReadTimeout error but data appears in dashboard
This is usually not a problem - data is being logged. The default batched async export
handles this gracefully since exports happen in the background. If you are using
disable_batch=True (synchronous mode), you can increase the timeout:
Retry on Failure
pip install tenacityDebugging Specific Issues
No tracer initialization message and no data logged
No tracer initialization message and no data logged
- Verify API key is set:
echo $HH_API_KEY - Enable verbose logging
- Confirm the API key is scoped to the project you expect in the HoneyHive UI
- Check firewall/VPN allows outbound HTTPS to
api.dp1.us.honeyhive.ai - Verify SSL certificate is valid
403 Forbidden error
403 Forbidden error
- Remove
TRACELOOP_API_KEYfrom environment if present - Verify API key is correct (check for whitespace)
- Confirm the API key is valid for your HoneyHive project
- Check key hasn’t expired
Session created but no spans inside
Session created but no spans inside
- Update honeyhive package:
pip install -U honeyhive - Check your provider package versions are up to date
- Verify traced functions are being called
- For async code, ensure proper context propagation
- Check that your provider package versions match the SDK requirements
Read timeout error
Read timeout error
- Ensure
disable_batch=False(default) so exports happen asynchronously in the background - Increase timeout value if using
disable_batch=True
Data takes long time to appear
Data takes long time to appear
- Call
tracer.flush()at end of execution to drain the batch queue - For Jupyter/serverless, always flush at end
- Reduce
flush_intervalfor faster delivery (default is 5 seconds), or set theHH_FLUSH_INTERVALenv var
SSL validation failure
SSL validation failure
- Set
SSL_CERT_FILEenvironment variable - For corporate proxy, use company’s CA certificate
- Install certifi:
pip install certifi - Contact us for SSL .pem file if needed
Import or ModuleNotFoundError
Import or ModuleNotFoundError
- Install full package:
pip install "honeyhive[all]" - For specific integrations:
pip install "honeyhive[openai]" - Check Python version (3.11+ required)
AttributeError: 'HoneyHiveTracer' object has no attribute 'provider'
AttributeError: 'HoneyHiveTracer' object has no attribute 'provider'
pip install honeyhive falls back to a legacy 0.x release, which has no tracer.provider.Solutions:- Check what you are running:
python --versionandpython -m pip show honeyhive - If Python is 3.10 or older, upgrade to 3.11+ - check the virtualenv your script uses, not just the system Python
- Reinstall in that environment:
pip install --upgrade honeyhive, and confirm the version is 1.x
Rate limit exceeded
Rate limit exceeded
- Implement retry with exponential backoff
- Reduce trace frequency with sampling
- Contact support for higher limits (Enterprise)
Payload too large (>5MB)
Payload too large (>5MB)
- Truncate large inputs/outputs before tracing
- Use references (URLs) for large files
- Don’t trace binary data directly
Context not propagated in threads
Context not propagated in threads
Traces mixed up between requests
Traces mixed up between requests
session_start() in a web server, or not creating sessions per request. session_start() stores the session ID on the tracer instance, so concurrent requests overwrite each other’s session.Solution: Use create_session() (sync) or acreate_session() (async), which store the session ID in request-scoped OpenTelemetry baggage:evaluate() is using the wrong tracer
evaluate() is using the wrong tracer
HoneyHiveTracer.init() call conflicts with the per-datapoint tracers that evaluate() creates automatically.Solution: Remove the global tracer when using evaluate(). Don’t pass tracer= to @trace decorators on functions called by evaluate():General Recommendations
Python
Serverless / Jupyter Notebooks
Serverless / Jupyter Notebooks
tracer.flush() before the execution context ends to drain any queued spans.Large payloads (>100k tokens)
Large payloads (>100k tokens)
tracer.flush() after the span completes.Async code
Async code
Fallback Solution
If all else fails:- Separate provider calls into dedicated functions
- Use
@tracedecorator on those functions - This gives you manual control over what’s traced