Skip to content

Commit bfda1d1

Browse files
Merge pull request #317 from Portkey-AI/new-fixes-may
Logs export page update and small fix exa
2 parents 8eec075 + 17b4248 commit bfda1d1

File tree

7 files changed

+170
-64
lines changed

7 files changed

+170
-64
lines changed

docs.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,8 @@
325325
]
326326
},
327327
{
328-
"group": "Tools",
329-
"pages": ["integrations/tools/exa"]
328+
"group": "Plugins",
329+
"pages": ["integrations/plugins/exa"]
330330
},
331331
{
332332
"group": "Vector Databases",
@@ -2210,6 +2210,10 @@
22102210
{
22112211
"source": "/guides/use-cases/build-a-chatbot-using-portkeys-prompt-templates",
22122212
"destination": "/guides/prompts/build-a-chatbot-using-portkeys-prompt-templates"
2213+
},
2214+
{
2215+
"source": "/integrations/tools/exa",
2216+
"destination": "/integrations/plugins/exa"
22132217
}
22142218
],
22152219
"seo": {

images/product/logs-export-1.png

547 KB
Loading

images/product/logs-export-2.png

508 KB
Loading

integrations/ecosystem.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Integrations"
33
---
44
<CardGroup cols={3}>
55
<Card icon="lightbulb" title="LLMs" href="/integrations/llms" />
6-
<Card icon="wrench" title="Tools" href="/integrations/tools" />
6+
<Card icon="wrench" title="Plugins" href="/integrations/plugins" />
77
<Card icon="robot" title="Agents" href="/integrations/agents" />
88
<Card icon="shield-halved" title="Guardrails" href="/product/guardrails/list-of-guardrail-checks" />
99
<Card icon="book" title="Libraries" href="/integrations/libraries" />

integrations/tools/exa.mdx renamed to integrations/plugins/exa.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ This process allows any LLM to respond with up-to-date knowledge without retrain
7070

7171
* Save this config and note its Config ID for use in your requests
7272

73+
<Note>
74+
The Exa Plugin is supported only as an `input guardrail`. It adds web search results to your request before it reaches the LLM, which is why only `before_request_hooks` are supported and not `after_request_hooks` on Portkey's gateway. [Learn more about guardrails here](/product/guardrails)
75+
</Note>
7376
### 4. Use the Config in Your Requests
7477

7578
<Tabs>
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
title: "(DEPRECATED) Logs Export"
3+
description: "Easily access your Portkey logs data for further analysis and reporting"
4+
---
5+
6+
<Info>
7+
Logs export feature is only available for [**Production**](https://portkey.ai/pricing) and [**Enterprise**](https://portkey.ai/docs/product/enterprise-offering) users.
8+
</Info>
9+
10+
<Note>
11+
Portkey offers an in-app logs export feature that is not generally available yet. If you're interested in early access, contact us at [email protected].
12+
</Note>
13+
14+
At Portkey, we understand the importance of data analysis and reporting for businesses and teams. That's why we provide a comprehensive logs export feature for our paid users. With this feature, you can easily request and obtain your Portkey logs data in a **structured JSON** format, allowing you to gain valuable insights into your LLM usage, performance, costs, and more.
15+
16+
## Requesting Logs Export
17+
18+
To submit a data export request, simply follow these steps:
19+
20+
1. Ensure you are an admin of your organization on Portkey.
21+
2. Send an email to [[email protected]](mailto:[email protected]) with the subject line `Logs Export - [Your_Organization_Name]`.
22+
3. In the email body,
23+
* Specify the **time frame** for which you require the logs data. **Pro plan** supports logs export of **last 30** days.
24+
* Share names of the **specific columns** you require (see the "[Exported Data](/product/observability/logs-export#exported-data)" section below for a complete list of available columns).
25+
4. Our team will process your request and provide you with the exported logs data in JSON format.
26+
27+
<Note>
28+
Note: Portkey only supports data exports in the `JSONL` format, and can not process exports in any other formats at the moment.
29+
</Note>
30+
31+
## Exported Data
32+
33+
The exported logs data will include the following columns:
34+
35+
| Column Name | Column Description / Property |
36+
| ---------------------- | --------------------------------------------------------- |
37+
| created\_at | Timestamp of the request |
38+
| request.body | Request JSON payload (as seen in the Portkey logs) |
39+
| response.body | Response JSON payload (as seen in the Portkey logs) |
40+
| is\_success | Request success status (1 = success, 0 = failure) |
41+
| ai\_org | AI provider name |
42+
| ai\_model | AI model name |
43+
| req\_units | Number of tokens in the request |
44+
| res\_units | Number of tokens in the response |
45+
| total\_units | Total number of tokens (request + response) |
46+
| cost | Cost of the request in cents (USD) |
47+
| cost\_currency | Currency of the cost (USD) |
48+
| request\_url | Final provider API URL |
49+
| request\_method | HTTP request method |
50+
| response\_status\_code | HTTP response status code |
51+
| response\_time | Response time in milliseconds |
52+
| cache\_status | Cache status (SEMANTIC HIT, HIT, MISS, DISABLED) |
53+
| cache\_type | Cache type (SIMPLE, SEMANTIC) |
54+
| stream\_mode | Stream mode status (TRUE, FALSE) |
55+
| retry\_success\_count | Number of retries after which request was successful |
56+
| trace\_id | Trace ID for the request |
57+
| mode | Config top level strategy (SINGLE, FALLBACK, LOADBALANCE) |
58+
| virtual\_key | Virtual key used for the request |
59+
| runtime | Runtime environment |
60+
| runtime\_version | Runtime environment version |
61+
| sdk\_version | Portkey SDK version |
62+
| config | Config ID used for the request |
63+
| prompt\_slug | Prompt ID used for the request |
64+
| prompt\_version\_id | Version number of the prompt template slug |
65+
| metadata.key | Custom metadata key |
66+
| metadata.value | Custom metadata value |
67+
68+
With this comprehensive data, you can analyze your API usage patterns, monitor performance, optimize costs, and make data-driven decisions for your business or team.
69+
70+
## Support
71+
72+
If you have any questions or need assistance with the logs export feature, reach out to the Portkey team at [email protected] or hop on to our [Discord server](https://portkey.ai/community).

product/observability/logs-export.mdx

Lines changed: 88 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -4,69 +4,96 @@ description: "Easily access your Portkey logs data for further analysis and repo
44
---
55

66
<Info>
7-
Logs export feature is only available for [**Production**](https://portkey.ai/pricing) and [**Enterprise**](https://portkey.ai/docs/product/enterprise-offering) users.
7+
Logs export feature is available for all the users.
88
</Info>
99

10-
<Note>
11-
Portkey offers an in-app logs export feature that is not generally available yet. If you're interested in early access, contact us at [email protected].
12-
</Note>
13-
14-
At Portkey, we understand the importance of data analysis and reporting for businesses and teams. That's why we provide a comprehensive logs export feature for our paid users. With this feature, you can easily request and obtain your Portkey logs data in a **structured JSON** format, allowing you to gain valuable insights into your LLM usage, performance, costs, and more.
15-
16-
## Requesting Logs Export
17-
18-
To submit a data export request, simply follow these steps:
19-
20-
1. Ensure you are an admin of your organization on Portkey.
21-
2. Send an email to [[email protected]](mailto:[email protected]) with the subject line `Logs Export - [Your_Organization_Name]`.
22-
3. In the email body,
23-
* Specify the **time frame** for which you require the logs data. **Pro plan** supports logs export of **last 30** days.
24-
* Share names of the **specific columns** you require (see the "[Exported Data](/product/observability/logs-export#exported-data)" section below for a complete list of available columns).
25-
4. Our team will process your request and provide you with the exported logs data in JSON format.
26-
27-
<Note>
28-
Note: Portkey only supports data exports in the `JSONL` format, and can not process exports in any other formats at the moment.
29-
</Note>
30-
31-
## Exported Data
32-
33-
The exported logs data will include the following columns:
34-
35-
| Column Name | Column Description / Property |
36-
| ---------------------- | --------------------------------------------------------- |
37-
| created\_at | Timestamp of the request |
38-
| request.body | Request JSON payload (as seen in the Portkey logs) |
39-
| response.body | Response JSON payload (as seen in the Portkey logs) |
40-
| is\_success | Request success status (1 = success, 0 = failure) |
41-
| ai\_org | AI provider name |
42-
| ai\_model | AI model name |
43-
| req\_units | Number of tokens in the request |
44-
| res\_units | Number of tokens in the response |
45-
| total\_units | Total number of tokens (request + response) |
46-
| cost | Cost of the request in cents (USD) |
47-
| cost\_currency | Currency of the cost (USD) |
48-
| request\_url | Final provider API URL |
49-
| request\_method | HTTP request method |
50-
| response\_status\_code | HTTP response status code |
51-
| response\_time | Response time in milliseconds |
52-
| cache\_status | Cache status (SEMANTIC HIT, HIT, MISS, DISABLED) |
53-
| cache\_type | Cache type (SIMPLE, SEMANTIC) |
54-
| stream\_mode | Stream mode status (TRUE, FALSE) |
55-
| retry\_success\_count | Number of retries after which request was successful |
56-
| trace\_id | Trace ID for the request |
57-
| mode | Config top level strategy (SINGLE, FALLBACK, LOADBALANCE) |
58-
| virtual\_key | Virtual key used for the request |
59-
| runtime | Runtime environment |
60-
| runtime\_version | Runtime environment version |
61-
| sdk\_version | Portkey SDK version |
62-
| config | Config ID used for the request |
63-
| prompt\_slug | Prompt ID used for the request |
64-
| prompt\_version\_id | Version number of the prompt template slug |
65-
| metadata.key | Custom metadata key |
66-
| metadata.value | Custom metadata value |
67-
68-
With this comprehensive data, you can analyze your API usage patterns, monitor performance, optimize costs, and make data-driven decisions for your business or team.
10+
At Portkey, we understand the importance of data analysis and reporting for businesses and teams. That's why we provide a comprehensive logs export feature that allows you to download your Portkey logs data in a **structured format**, enabling you to gain valuable insights into your LLM usage, performance, costs, and more.
11+
12+
## Exporting Logs In-App
13+
14+
You can now export logs directly from the Portkey application by following these steps:
15+
16+
1. Navigate to the **Exports** section on the main sidebar.
17+
18+
2. Click the **Request Data** button in the top-right corner.
19+
20+
3. Configure your export parameters:
21+
- **Time Range**: Select the period for which you want to export logs
22+
- **Logs Limits**: Choose maximum number of logs or set a custom offset
23+
- **Requested Fields**: Select which data columns to include in your export
24+
25+
<Frame>
26+
<img src="/images/product/logs-export-2.png" alt="Export logs parameters configuration screen"/>
27+
</Frame>
28+
29+
4. After setting your parameters, click **Request Export**.
30+
31+
32+
## Available Export Fields
33+
34+
When configuring your log export, you can select from the following fields:
35+
36+
| Field Name | Description |
37+
| -------------------- | --------------------------------------------------------- |
38+
| ID | Unique identifier for the log entry |
39+
| Trace ID | Identifier for tracing related requests |
40+
| Created At | Timestamp of the request |
41+
| Request | Request JSON payload |
42+
| Response | Response JSON payload |
43+
| AI Provider | Name of the AI provider used |
44+
| AI Model | Name of the AI model used |
45+
| Request Tokens | Number of tokens in the request |
46+
| Response Tokens | Number of tokens in the response |
47+
| Total Tokens | Total number of tokens (request + response) |
48+
| Cost | Cost of the request in cents (USD) |
49+
| Cost Currency | Currency of the cost (USD) |
50+
| Response Time | Response time in milliseconds |
51+
| Status Code | HTTP response status code |
52+
| Config | Config ID used for the request |
53+
| Prompt Slug | Prompt ID used for the request |
54+
| Metadata | Custom metadata key-value pairs |
55+
56+
57+
5. Once your export is processed, you'll see it in the exports list with a status indicator:
58+
- **Draft**: Export job created but not yet started
59+
- **Success**: Export completed successfully
60+
- **Failure**: Export job failed. Click on the `Start Again` button to retry the job.
61+
62+
6. Clik on the **Start** button the dashboard to start the logs-export job
63+
64+
7. For completed exports, click the **Download** button to get your logs data file. You can
65+
66+
<Frame>
67+
<img src="/images/product/logs-export-1.png" alt="List of exports with status and download options"/>
68+
</Frame>
69+
70+
<Note>
71+
Currently we only support exporting 50k logs per job. For more help reach out to the Portkey team at [[email protected]](mailto:[email protected])
72+
</Note>
73+
74+
## Export File Details
75+
76+
Exported logs are provided in JSONL format (JSON Lines), where each line is a valid JSON object representing a single log entry. This format is ideal for data processing and analysis with tools like Python's Pandas or other data analysis frameworks.
77+
78+
Each export includes:
79+
- Up to 50,000 logs per export job (as shown in the preview panel)
80+
- All fields selected during the export configuration
81+
- A timestamp indicating when the export was created
82+
83+
## Use Cases for Exported Logs
84+
85+
With your exported logs data, you can:
86+
- Generate custom reports for stakeholders
87+
- Feed data into business intelligence tools
88+
- Identify patterns in user behavior and model performance
89+
90+
You can analyze your API usage patterns, monitor performance, optimize costs, and make data-driven decisions for your business or team.
6991

7092
## Support
7193

72-
If you have any questions or need assistance with the logs export feature, reach out to the Portkey team at [email protected] or hop on to our [Discord server](https://portkey.ai/community).
94+
If you have any questions or need assistance with the logs export feature, reach out to the Portkey team at [[email protected]](mailto:[email protected]) or join our [Discord community](https://portkey.ai/community).
95+
96+
97+
<Card href="/product/observability/logs-export-deprecated" title="(Deprecated) Logs Export Page">
98+
99+
</Card>

0 commit comments

Comments
 (0)