What is a log API? A practical developer’s guide
Understand logging libraries, ingestion endpoints, and query interfaces—and build an event contract that connects them.
Logging patterns for applications, AI, and everything in between. Understand your events, connect the context, and build with less guesswork.
{
"schema_version": "1.0",
"timestamp": "2026-09-21T09:41:02.184Z",
"severity": "INFO",
"event_id": "evt_demo_001",
"event_name": "request.completed",
"service": "checkout-api",
"attributes": {
"route": "/orders/{id}",
"status_code": 200,
"duration_ms": 42
}
}{
"schema_version": "1.0",
"timestamp": "2026-09-21T09:41:02.184Z",
"severity": "INFO",
"event_id": "evt_demo_002",
"event_name": "generation.completed",
"service": "assistant-worker",
"attributes": {
"workflow_id": "wf_demo_042",
"model": "example-model",
"config_version": "prompt-v3",
"outcome": "completed",
"duration_ms": 842
}
}{
"schema_version": "1.0",
"timestamp": "2026-09-21T09:41:02.184Z",
"severity": "INFO",
"event_id": "evt_demo_003",
"event_name": "usage.recorded",
"service": "assistant-worker",
"attributes": {
"input_tokens": 1240,
"output_tokens": 386,
"usage_source": "sample",
"usage_complete": true
}
}{
"schema_version": "1.0",
"timestamp": "2026-09-21T09:41:02.184Z",
"severity": "WARN",
"event_id": "evt_demo_005",
"event_name": "access.denied",
"service": "identity-service",
"attributes": {
"actor_ref": "actor_demo_07",
"action": "settings.write",
"decision": "deny",
"outcome": "not_executed"
}
}Explore the fields, decisions, and implementation patterns behind every kind of log.
Design AI logs for workflows, retrieval, tool actions, and application outcomes—with metadata at the center.
Explore the patternTrack input and output token measurements, preserve their provenance, and keep estimates separate from reported usage.
Explore the patternConnect LLM events to retrieval, retries, validation, and delivery so a single request tells a coherent story.
Explore the patternUnderstand routes, response outcomes, and latency while keeping edge, proxy, and application observations distinct.
Explore the patternBuild useful security events around access checks, administrative actions, and sensitive changes—not just generic errors.
Explore the patternRead firewall and WAF events with their original source, rule, action, and request context intact.
Explore the patternChoose stable fields and a clear outcome. Keep sensitive content out of the default event.
Document validation, queue limits, and what an acknowledgment actually means.
Link related events so the next investigation starts with evidence, not interpretation.
Your pipeline. Your storage. One understandable event.
Keep the identifiers and outcomes that answer a real question.
Prefer safe metadata over complete requests and private prompts.
Make missing records, retries, and delivery limits part of the design.
Understand logging libraries, ingestion endpoints, and query interfaces—and build an event contract that connects them.
Keep reported usage separate from estimates, handle retries, and make cost calculations explainable.
Preserve rule decisions, review false positives, and connect edge events to application evidence.
A few things worth knowing before your first event.
Browse the documentation →A log API can mean an application logging interface, an event-ingestion endpoint, or a query interface over stored records. Our guides separate these responsibilities so you can design each boundary deliberately.
AI logging can cover the full application workflow, including retrieval and tool actions. LLM logging focuses on model-related operations, usage, and completion states. Both benefit from shared identifiers and explicit outcomes.
No. The token guides discuss model usage measurements. Authentication tokens, passwords, and other credentials should not be copied into routine telemetry.
No. Every event in the explorer is a fixed synthetic fixture. Switching tabs, copying an event, or downloading JSON does not submit data to a logging endpoint.
This site provides implementation guides, schemas, and local examples. A production collector, access policy, and storage destination belong in your own configured environment.
Read the quickstart to emit one structured event locally. Then review the event schema and the delivery guide before connecting a production pipeline.
Start with a clear schema. Keep the context that matters.