Why Async Logging?
Zero Latency
No proxy overhead - requests go directly to the provider.
Automatic Instrumentation
Uses OpenLLMetry to automatically capture all LLM calls.
Multi-Provider Support
Works with OpenAI, Anthropic, Cohere, Bedrock, Google AI, and more.
Framework Support
Supports LangChain, LlamaIndex, and other frameworks.
Quick Start
1
Install the package
2
Initialize the logger
3
Use your SDK normally
4
View your logs
All requests appear in your Helicone dashboard with zero latency impact.
Supported Providers
OpenAI
Anthropic
Multiple Providers
AWS Bedrock
Google AI Platform
Together AI
LangChain Integration
Async logging works automatically with LangChain:Custom Properties
Add custom properties using thewithProperties method:
Custom Headers
Add custom headers for all requests:Custom Base URL
Use a custom Helicone endpoint:sk-helicone-eu-*→https://eu.api.helicone.ai/v1/trace/log- Other keys →
https://api.helicone.ai/v1/trace/log
How It Works
1
Automatic instrumentation
When you call
logger.init(), Helicone uses OpenLLMetry to automatically instrument your LLM SDKs.2
Trace capture
OpenLLMetry captures traces of all LLM calls, including:
- Request parameters
- Response data
- Token usage
- Latency
- Errors
3
Async export
Traces are sent asynchronously to Helicone’s trace endpoint using OpenTelemetry’s OTLP format.
4
Zero latency
Since logging happens asynchronously, there’s no impact on your application’s latency.
Configuration Options
Streaming Support
Async logging works with streaming:Error Handling
Errors are automatically logged:Best Practices
Initialize once at startup
Initialize once at startup
Initialize the logger once when your application starts:Then import and use in your application:
Use withProperties for request context
Use withProperties for request context
Add context to specific requests:
Set common headers globally
Set common headers globally
Use the
headers option for properties that apply to all requests:Combine with proxy for testing
Combine with proxy for testing
Use async logging in production and proxy in development:
Comparison: Async vs Proxy
Troubleshooting
Requests not appearing in dashboard
Requests not appearing in dashboard
- Verify your Helicone API key is correct
- Check that
logger.init()is called before making requests - Ensure the provider is passed to the logger configuration
- Check for any network errors in your logs
Missing custom properties
Missing custom properties
- Use
logger.withProperties()to add properties per request - Use the
headersoption for global properties - Property names must start with
Helicone-Property-
LangChain not being tracked
LangChain not being tracked
- Import and pass the LangChain modules to the logger:
Provider not supported
Provider not supported
Currently supported providers:
- OpenAI
- Anthropic
- Cohere
- AWS Bedrock
- Google AI Platform
- Together AI
- LangChain
TypeScript Support
The@helicone/async package includes full TypeScript types:
Next Steps
OpenAI Integration
OpenAI-specific integration guide
Anthropic Integration
Anthropic-specific integration guide
LangChain Integration
LangChain integration patterns
Proxy Integration
Compare with proxy integration
