> ## Documentation Index
> Fetch the complete documentation index at: https://docs.traceport.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Logs

> View real-time completions, token usage, latency, and costs for every LLM request.

The **Logs** page captures every completion sent through the Traceport gateway, providing fine-grained, real-time insights into your organization's AI operations.

Navigate to **Logs** in the sidebar under Overview. The page opens to the **API Logs** tab by default.

<Frame>
  <video autoPlay loop muted playsInline src="https://mintcdn.com/traceport/ZXBNThc7kv_3RvjA/images/logs-api.mp4?fit=max&auto=format&n=ZXBNThc7kv_3RvjA&q=85&s=c549c456c15d51bb49663826427b4ddc" className="w-full rounded-lg" data-path="images/logs-api.mp4" />
</Frame>

## What is Tracked

Every log entry captures comprehensive metadata:

| Field               | Description                                              |
| ------------------- | -------------------------------------------------------- |
| **Timestamp**       | The exact time the completion originated                 |
| **Provider**        | The AI provider used (e.g., OpenAI, Anthropic, Google)   |
| **Model**           | The specific model (e.g., `gpt-4o`, `claude-3-5-sonnet`) |
| **Tokens (In/Out)** | Prompt (input) and completion (output) tokens consumed   |
| **Duration**        | How long the request took to complete (ms)               |
| **Cost**            | Estimated cost based on the provider's token pricing     |
| **Endpoint**        | The API endpoint called (e.g., `chatComplete`)           |

## Log Detail View

Clicking any log entry opens a **detail panel** showing the full request and response data:

The detail panel includes:

<AccordionGroup>
  <Accordion title="Overview">
    Status (Success/Failed), Trace ID, Span ID, provider name, model used, and the API endpoint.
  </Accordion>

  <Accordion title="Metrics & Cost">
    Execution duration (ms), total tokens, total cost, and a breakdown of input vs output tokens.
  </Accordion>

  <Accordion title="Request Body">
    The exact JSON payload sent to the model — including system prompts, user messages, and model parameters like temperature and max tokens.
  </Accordion>

  <Accordion title="Response Body">
    The full model response content, including finish reason, token usage details, and any tool calls.
  </Accordion>
</AccordionGroup>

## Filtering and Search

As your log volume grows, isolate specific issues or usage patterns by applying filters:

* **Status** — Filter `Failed` vs `Successful` requests to separate errors from valid traffic.
* **API Key** — Filter by individual API keys to identify which application is driving specific traffic patterns.
* **Provider & Model** — View traffic for a specific provider (e.g., only Anthropic or only OpenAI requests).
