Logs

The Logs section presents a chronological list of all the requests processed through Portkey. Each log entry provides useful data such as the timestamp, request type, LLM used, tokens generated, and cost. For multimodal models, Logs will also show the image sent with vision/image models, as well as the image generated.

By clicking on an entry, a side panel opens up, revealing the entire raw data with the request and response objects.

This detailed log can be invaluable when troubleshooting issues or understanding specific interactions. It provides full transparency into each request and response, enabling you to see exactly what data was sent and received.

Share Logs with Teammates

Each log on Portkey has a unique URL. You can copy the link from the address bar and directly share it with anyone in your org.

Request Status Guide

The Status column on the Logs page gives you a snapshot of the gateway activity for every request.

Portkey’s gateway features—Cache, Retries, Fallback, Loadbalance—are all tracked here with their exact states (disabled, triggered, etc.), making it a breeze to monitor and optimize your usage.

Common Queries Answered:

  • Is the cache working?: Enabled caching but unsure if it's active? The Status column will confirm it for you.

  • How many retries happened?: Curious about the retry count for a successful request? See it in a glance.

  • Fallback and Loadbalance: Want to know if load balance is active or which fallback option was triggered? See it in a glance.

Option🔴 Inactive State🟢 Possible Active States

Cache

Cache Disabled

Cache Miss,

Cache Refreshed,

Cache Hit,

Cache Semantic Hit

Retry

Retry Not Triggered

Retry Success on {x} Tries,

Retry Failed

Fallback

Fallback Disabled

Fallback Active,

Fallback Triggered on Option {x}

Loadbalance

Loadbalancer Disabled

Loadbalancer Active

Manual Feedback

As you're viewing logs, you can also add manual feedback on the logs to be analysed and filtered later. This data can be viewed on the feedback analytics dashboards.

Configs & Prompt IDs in Logs

If your request has an attached Config or if it's originating from a prompt template, you can see the relevant Config or Prompt IDs separately in the log's details on Portkey. And to dig deeper, you can just click on the IDs and Portkey will take you to the respective Config or Prompt playground where you can view the full details.

Debug Requests with Log Replay

You can rerun any buggy request with just one click, straight from the log details page. The Replay button opens your request in a fresh prompt playground where you can rerun the request and edit it right there until it works.

Replay button will be inactive for a log in the following cases:

  1. If the request is sent to any endpoint other than /chat/completions, /completions, /embeddings

  2. If the virtual key used in the log is archived on Portkey

  3. If the request originates from a prompt template which is called from inside a Config target

Last updated