Current support
AI Gateway endpoints emit standard ngrok traffic logs (
http_request_complete.v0). AI-specific log fields (provider selection, retry tracking, token usage) are not currently available but are on our roadmap.- Stream request/response logs to your analytics platform
- Archive traffic data for compliance
- Build custom dashboards and alerts
- Integrate with your existing observability stack
Setting up log exporting
Log Exports are configured at the account level through the ngrok Dashboard:1
Open Log Exporting
Go to Log Exporting in the ngrok Dashboard
2
Create a New Log Export
Click to create a new Log Export
3
Select Log Sources
Choose which log sources to capture (for example,
http_request_complete.v0 for HTTP traffic)4
Configure Destinations
Select and configure one or more destinations for your logs
Supported destinations
ngrok supports exporting logs to:- Amazon CloudWatch - AWS logging and monitoring
- Amazon Firehose - AWS data streaming (can deliver to S3)
- Amazon Kinesis - AWS data streaming
- Azure Logs Ingestion - Azure logging
- Datadog Logs - Monitoring and analytics
What logs include
Standard HTTP traffic logs from AI Gateway endpoints include:| Field | Description |
|---|---|
event_id | Unique identifier for the log |
event_timestamp | When the request completed |
account_id | Your ngrok account ID |
conn.client_ip | Client IP address |
conn.server_name | Endpoint hostname |
http.request.method | HTTP method (POST, GET, etc.) |
http.request.url.path | Request path (for example, /v1/chat/completions) |
http.response.status_code | Response status code |
http.response.body_length | Response body size |
What’s not yet included
Filtering logs
You can filter traffic logs using CEL expressions to capture only relevant requests:Use cases
Compliance logging
Stream all requests to long-term storage for audit trails:- Use Amazon Firehose to deliver to S3
- All HTTP requests are captured with timestamps and metadata
- Combine with Traffic Inspector for full body capture when needed
Real-time monitoring
Send logs to your monitoring platform:- Use Datadog or CloudWatch destinations
- Build dashboards showing request volume and latency
- Set up alerts for error spikes
Custom analytics
Process logs in your own systems:- Stream to Kinesis or Firehose
- Build custom pipelines for your specific needs
- Aggregate and analyze traffic patterns
See also
- Log Exporting Documentation - Full ngrok Log Exporting docs
- Traffic Inspector - View request/response bodies
- Metrics Reference - Use metrics for intelligent routing