Request logs and telemetry
Learn what the request log stores, how redaction and retention work, who sees which rows, what tool telemetry records, and how to export or delete data.
Last updated
The gateway keeps two kinds of records. The request log holds one row for each request that passes through the gateway. Tool telemetry holds one row for each tool event in a coding session. This page explains the fields, the defaults, who can read the rows and how to export or delete them in the console.
What the request log stores#
Open the Request logs page to read the log. The table has these columns: Time, Provider, Model, User, Account, Status and Duration. Select a row to open a detail sheet. The sheet is titled with the method and the route of the request. It shows these parts:
- Error, or "No error recorded".
- Request body and Response body.
- Request headers, split into Inbound and Upstream, and Response headers.
- Identifiers, such as the Correlation ID, the session, the device and the account.
The export file has more columns than the table. It adds, for example, the input and output token counts, the cost, the key id, the client IP and the user agent.
Defaults for logging and redaction#
Redaction removes data before the gateway stores a row. These server settings control the log. The values below are the defaults.
| Setting | Console label | Default | Meaning |
|---|---|---|---|
enableRequestLogging | Request logging | on | When off, the gateway stores no rows. |
captureRequestHeaders | Capture headers | on | When off, the gateway stores no headers. |
redactRequestHeaders | Redact header values | on | Header values are redacted before storage. |
redactRequestContent | Redact request content | on | Prompt and response data is removed. Only structure remains. |
requestLogRetentionDays | None | 7 | Rows older than this many days are deleted. |
An administrator changes the first four settings in the "Logging settings" card at the top of the Request logs page. "Capture headers" and "Redact request content" need "Request logging" to be on. "Redact header values" needs "Capture headers" to be on. The card also holds a "Minimum free disk (%)" field. If free disk space is at or below that floor, the gateway redacts content even when "Redact request content" is off.
When you turn a redaction off, the console asks for confirmation. The dialog says that new request logs store header values or request content in plaintext until you turn the setting back on. Entries that exist already do not change. When you turn off header redaction, the gateway stores header values as sent. A few identity headers stay masked.
The console has no field for retention. An administrator sets requestLogRetentionDays as a server setting.
Retention#
Retention is a whole number of days from 1 to 30. A missing or zero value gives 7 days. A background sweep deletes older rows in batches. The Advanced settings page under Global has a "Request-log sweep (sec)" field for the spacing between sweeps. The server does not start the periodic sweep when requestLogSweepIntervalSec is 0 or lower.
An administrator can also delete rows by hand in the "Danger zone" of the "Logging settings" card:
- Enter a number in "Older than (days)", from 1 to 3650. The default is 30. Select "Clear logs older than" that many days. In the "Clear old log entries" dialog, confirm with "Clear logs".
- Select "Clear all logs". In the "Clear all log entries" dialog, confirm with "Clear all".
- Select the delete button on one row to remove one entry.
Who sees which rows#
The server applies these rules to the table, the detail sheet and the export.
| Role | Rows |
|---|---|
| Member | Own rows. When organization usage sharing is on, the rows of the organization. |
| Org admin | Rows of the own organization. |
| Administrator | Rows of all users. |
| Read-only auditor | Rows of all users. |
An administrator or an auditor can narrow by organization, user id or user email.
The "Request log scope" switch shows only to users who belong to an organization. It has two choices, Organization and Personal. Personal shows only your own spend. The Organization view leaves out rows of accounts that are hidden from the organization.
The "User email" filter appears for administrators and auditors in the Organization scope. It also appears when sign-in is off. It does not appear in the Personal scope. A member or an org admin cannot target another user. The server ignores such a filter for them.
Export request logs#
The results toolbar has an Export button and a format list with CSV and JSON. The button stays disabled when the table has no rows. The export uses the filters and the scope that you set. The file name is memtrunk-request-logs-<date>.csv or .json.
Tool telemetry#
A tool event records one use of a tool in a coding session. The gateway records tool events from the requests that it proxies. Each event has these fields:
timestamp,userIdandorgIdproject, which holds the full workspace pathsessionId,agentIdandparentAgentIdtool,category,subagentType,skill,mcpServerandslashCommandmodel,stopReason,errorClassandisError
A background sweep deletes tool events that are older than toolEventRetentionDays. The default is 90 days. An administrator sets it in the "Tool-event retention" card of the Advanced settings under Global, as "Tool-event retention (days)", from 1 to 365.
Telemetry and Projects pages#
The console has a Telemetry page and a Projects page. Both appear in the menu only when the telemetryEnabled flag is on for you. The flag combines the telemetry setting of your organization with a setting that an admin keeps for each user.
- Telemetry shows operational metrics and anomaly signals for agent and tool usage sessions.
- Projects shows activity and cost for each project.
Export tool events#
The Export button on the Telemetry page saves tool events as CSV or JSON. It uses the "Date range" filter, which starts at "Last 7 days", and the "View as" filter, which starts at "Me". The file name is memtrunk-tool-events-<date>.csv or .json. The columns match the event fields, without orgId.
A member or an org admin exports only own events. The "View as" filter appears for administrators and auditors, so an auditor can choose another user.
Stop collection or delete data for a project#
Each row on the Projects page has a Collect checkbox and a Delete button. Both change only your own events.
- Clear Collect to stop tool telemetry for that project. Select it again to resume. The table lists only events that have a project.
- Select Delete to remove your tool events for the project. The dialog "Delete telemetry for" the project says that it permanently deletes the recorded events and that this cannot be undone. The delete does not touch memory data.
The collection switch is independent of the memory switches.
The server refuses both actions for an auditor. The console then shows the error text Auditor role is read-only.