Skip to main content
Helicone’s async logging provides zero-latency observability by logging requests asynchronously without proxying traffic through our servers.

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 the withProperties method:

Custom Headers

Add custom headers for all requests:

Custom Base URL

Use a custom Helicone endpoint:
The base URL is automatically determined by your API key prefix:
  • 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 the logger once when your application starts:
Then import and use in your application:
Add context to specific requests:
Use the headers option for properties that apply to all requests:
Use async logging in production and proxy in development:

Comparison: Async vs Proxy

Use async logging for production to eliminate latency. Use proxy integration when you need features like caching and rate limiting.

Troubleshooting

  1. Verify your Helicone API key is correct
  2. Check that logger.init() is called before making requests
  3. Ensure the provider is passed to the logger configuration
  4. Check for any network errors in your logs
  • Use logger.withProperties() to add properties per request
  • Use the headers option for global properties
  • Property names must start with Helicone-Property-
  • Import and pass the LangChain modules to the logger:
Currently supported providers:
  • OpenAI
  • Anthropic
  • Cohere
  • AWS Bedrock
  • Google AI Platform
  • Together AI
  • LangChain
For other providers, use proxy integration.

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