Log Type | Recorded Content | Recommended |
AuditLog | Structured metadata for a single call, such as Request ID, request time, model, service, API Key, client IP address, status code, Token usage, latency, and so on. | Compliance auditing, call tracing, usage verification, security investigation |
ActivityLog | Audit log fields, as well as detailed fields such as original request, model response, and log reporting source. | Troubleshooting single requests, analyzing model performance, tracing call chains |
Configuration Item | Description |
Destination Region | Select the region where the target CLS logset is located. It must be consistent with the region where Tokenhub is located. |
Log Topic Operation | Select an existing log topic or create a new one as prompted on the page. |
Logset | Select the CLS logset for receiving TokenHub logs. |
Log topic | Select the CLS log topic for storing the current log type. It is recommended to use different log topics for audit logs and invocation logs to facilitate independent management of permissions, indexes, and retention periods. |
Filter | Description |
API Key | View the call records of all keys or a specified Key. |
Status | View the call records for all statuses or a specified status code. |
Time Range | Supports today, last 7 days, last 30 days, or a custom time range. |
Keyword | Supports searching by entering an API Key ID or Request ID. |
Category | Field | Type | Description |
Basic Request Information | request_id | string | Unique identifier for a request, used for full-link tracing and troubleshooting. |
Basic Request Information | created_at | datetime | The start time of the request, in timestamp format. |
Basic Request Information | finished_at | datetime | The end time of the request, which can be used to calculate end-to-end latency. |
Basic Request Information | status | int | HTTP status code, which includes statuses such as 2xx, 4xx, and 5xx. |
Interface and Protocol | api | string | The request path, for example, /v1/chat/completions. |
Interface and Protocol | api_type | string | The protocol type, for example, chat, responses, and embedding. |
Interface and Protocol | is_stream | bool | Whether the request is a streaming request. |
Model Information | model_id | string | The model ID selected by the routing process. |
Model Information | model_name | string | Model Name. |
Model Information | model_type | string | The model type, for example, llm, embedding, and multimodal. |
Authentication and Client | api_key_id | string | API Key ID. |
Authentication and Client | auth_type | string | The authentication method, for example, apikey. |
Authentication and Client | user_agent | string | Client User-Agent. |
Authentication and Client | client_ip | string | The source IP address of the client. |
Token Statistics | input_tokens | int | The number of input tokens, which already includes the number of tokens hit by the read cache. |
Token Statistics | output_tokens | int | The number of output tokens. |
Token Statistics | total_tokens | int | The total number of tokens, total_tokens = input_tokens + output_tokens. |
Token Statistics | cache_tokens | int | The number of tokens hit by the read cache. |
Token Statistics | thinking_tokens | int | The number of thinking tokens, applicable to deep thinking models. |
Performance and Latency | ttft | int(ms) | Time To First Token (TTFT). |
Performance and Latency | tpot | int(ms) | Time Per Output Token (TPOT). |
Performance and Latency | is_timeout | bool | Whether the request timed out. |
Performance and Latency | is_canceled | bool | Whether the request was canceled or disconnected by the client. |
Business Identifier | service_type | string | Service Types The online inference service is set to inference_service. The TokenPlan Enterprise plan is set to token_plan_enterprise. |
Business Identifier | endpoint_id | string | The ID of the online inference service. It is empty in TokenPlan scenarios. |
Business Identifier | endpoint_name | string | The name of the online inference service. It is empty in TokenPlan scenarios. |
Business Identifier | team_id | string | The ID of the plan, used in TokenPlan scenarios. |
Business Identifier | team_name | string | The name of the plan, used in TokenPlan scenarios. |
Field | Type | Description |
input | string(JSON) | The complete user request body, containing information such as the model, message content, and streaming parameters. |
output | string(JSON) | The complete model response. The response structure may vary across different products or APIs. Refer to the actual log content for details. |
フィードバック