You need to enable JavaScript to run this app.
Torch Log Service

Torch Log Service

Copy page
Download PDF
Coding Agent log app
Codex observability
Copy page
Download PDF
Codex observability
This section introduces the Codex Observability application for large model logs, available in the TLS Application Marketplace.​
Overview​
The TLS Codex observability log application offers services including Codex observability dashboards, trace call chains, session analysis, and token analysis.​
After you integrate the Codex Observability log application, TLS automatically creates a dedicated Codex Trace log topic, generates visual charts, and displays session, Trace, Token, and tool invocation data, enabling traceability and observability. Applicable scenarios include the following:​
​
Observability​
Description​
Performance analysis​
  • Model invocation latency distribution​
  • Tool execution time ranking​
  • Token consumption trends​
Error tracking​
  • View the complete call chain​
  • Identify the error stage​
  • Analyze the cause of the error​
Cost optimization​
  • Identify high-consumption conversations​
  • Optimize prompts to reduce tokens​
  • Select more cost-effective models​
​
Prerequisites​
​
Category​
Description​
Software limits​
To deploy Codex, the server must have NPM and Node.js version 22 or later installed.​
Region restriction​
The server deployed with Codex and the TLS must be in the same region to ensure network connectivity.​
Authentication method​
Depending on the authentication method, obtain the user's Access Key ID, Secret Access Key, or APIKey.​
  • AK/SK: AccessKey ID and AccessKey Secret for Volcano Engine accounts.​
  • Obtain from the Key Management page in the Volcano Engine console. We recommend using IAM user keys. Ensure this user has the required permissions. For details, see IAM overview.​
  • Supports automatic creation of TLS resources (project/app/topic) and auto-generates log topic IDs.​
  • API Key: A key credential for requesting Volcano TLS. It is used only for reporting Log, Metric, and Trace data.​
  • Enforces strict permissions and does not support auto creation of TLS resources.​
  • It is suitable for multi-data center environments and strict permission management scenarios.​
Notice​
API Key is in closed beta. If needed, contact your account manager for access to the allowlist.​
​
1. Integrate the Codex log application​
  1. Log in to TLS console.​
  1. Select the region where log service is located from the top navigation bar.​
  1. In the left navigation bar, select AgentLoop > AI observability.​
  1. On the AI observability page, click Integrate AI observability.​
  1. On the Integrate AI observability page, create an application.​
  1. Click the Codex icon and select the Codex application.​
  1. Configure the integration parameters, then click Create application.​
  • ​
    Parameters​
    Description​
    Region​
    The region where the log application data is stored.​
    Log project​
    Select the project where log application data is stored.​
    Notice​
    After the log application is successfully created, a log topic with the CODEX tag will be automatically created in the project to store trace data. The relevant information for this log topic is as follows:​
    • Log topic name: application name_trace​
    • Number of shards: 2​
    • Log storage period: Standard storage for 90 days​
    • Index: Key-value index configured automatically.​
    Application name​
    Enter the name of the Codex log application.​
    • Length must be between 3 and 64 characters.​
    • Only supports Chinese, lowercase letters, numbers, underscores (_), and hyphens (-).​
    • Can not start or end with a hyphen (-) or underscore (_).​
    • Cannot start with tls_, tos_, or certain reserved fields.​
    Description​
    Description of the log application.​
    Length limit is 0–128 characters.​
    ​
  1. After creating the application, proceed to the next step to obtain the usage guide and integrate the log application.​
2. Integrate Codex application data​
  1. Obtain the usage guide for integrating Codex application data.​
  1. Go to the Integration configuration page.​
  • ​
    Obtain when integrating the log application
    Obtain after integrating the log application
    ​
    When creating a Codex log application in AgentLoop, you can obtain the corresponding usage guide based on the interface prompts.​
    1. Refer to 1. Integrate the Codex log application to integrate the Codex log application.​
    1. On the Integrate AI Observability page, in Integration Configuration, configure the following information to obtain the usage guide.​
    ​
  1. On the Integration configuration page, select the authentication method, configure the following information, and obtain the usage guide.​
  • ​
    AK/SK Access
    API Key Access
    ​
    1. For Access Method, select AK SK Access.​
    1. For Connection Method, select Public Network or Volcano Engine Intranet as appropriate.​
    1. In Usage Guide, copy the usage guide generated by Auto generation.​
    ​
  • Usage guide example (AK/SK integration method):​
  • ​
    Public Network
    Volcano Engine Intranet
    ​
    ​
    npm exec -y​
    --registry=https://registry.npmjs.org/​
    --package=@volcengine/tls-observer-codex-install@latest --​
    tls-observer-codex-install​
    --non-interactive​
    --force​
    --region The system autopopulates the current region.​
    --trace-topic-id The system autopopulates the trace-topic-id​
    --ak <Requires manual replace of the actual tls-ak>​
    --sk <Requires manual replace of the actual tls-sk>​
    ​
    ​
  1. (AK/SK method only) Modify the authentication information in the usage guide.​
  • Enter the obtained Access Key ID and Secret Access Key into the AK and SK fields of the usage guide, respectively.​
  1. Integrate Codex Observability logs into the log application.​
  1. Log in to the server where Codex is deployed.​
  1. Use the information obtained from the usage guide to install the TLS plugin.​
  1. After the plugin is installed, restart the Codex service.​
  1. Return to the TLS console to view the observability chart data.​
Monitoring chart details​
The TLS Codex observability application provides detailed monitoring charts as follows:​
​
Type​
Chart​
Homepage​
  • Request overview:​
  • Number of sessions, number of conversations, number of model requests, number of tool invocations, request trends.​
  • Cost overview:​
  • Total Tokens, Input Tokens, Output Tokens, Cache Read Tokens, Reasoning Tokens, Token consumption trends, model invocation trends​
  • Tool overview​
  • Number of successful invocations, number of failed invocations, tool invocation duration P90, top 10 tool invocations, top 10 tool invocation failures, tool invocation trends​
  • Model performance overview​
  • Top 10 model invocation distribution, model invocation duration P90, provider invocation distribution, provider invocation duration P90​
Trace analysis​
  • Homepage​
  • Total trace count, total token consumption, average tokens, P90 duration​
  • Trace call chain analysis​
  • Displays the specified call chain's Trace ID, status, total duration (ms), TotalTokens, start time, end time, and more.​
Session analysis​
  • Homepage​
  • Session count, total token consumption, model request count, average session tokens​
  • Session analysis​
  • Displays the specified session's Input/Session ID, tokens, total duration (ms), call chain, start time, end time, model, and more.​
Token analysis​
  • Homepage​
  • Total Tokens, Input Tokens, Output Tokens, Cache Read Tokens, Reasoning Tokens, Input Tokens (excluding Cache), top 10 session token consumption, top 10 model token consumption, token category proportions​
Topic list​
Displays the log types, projects, log topics, description information, and more generated by the current log application.​
​
Manage my applications​
After the log application is successfully connected, you can manage connected log applications as follows:​
​
AgentLoop
App Market
​
  1. Log in to TLS console.​
  1. Select the region where log service is located from the top navigation bar.​
  1. In the left navigation bar, select AgentLoop > AI Monitoring.​
  1. On the AI Monitoring page, in the Actions column of the corresponding log application, the following management operations are supported:​
  • Edit application information: Click the edit icon to modify the application name and description.​
  • Obtain usage guide: Click the access configuration icon to open the access configuration pop-up window, where you can obtain sample usage guide information.​
  • Delete my application: Click the delete icon to remove this log application.​
​
ApplicationName_trace (log topic) log fields​
​
Field​
Type​
Description​
Attributes​
json​
Custom key-value pairs attached to the Span, recording business-related information.​
Duration​
long​
The duration of the Span (End - Start), measuring the time consumed by the operation.​
End​
long​
Span end time.​
Events​
text​
Events that occur during the Span lifecycle.​
Host​
text​
The host running the service.​
Kind​
text​
The type of the Span.​
Links​
text​
References to other Spans (used for cross-Trace associations, such as asynchronous task scenarios).​
Name​
text​
The name of the Span, usually a description of the operation.​
OTLPName​
text​
The original name when reported via the OTLP protocol (OTLP = OpenTelemetry Protocol).​
OTLPVersion​
text​
The version number of the OTLP protocol used.​
ParentSpanID​
text​
The ID of the parent Span, indicating which operation triggered the current operation. This field is empty for the root node.​
Resource​
json​
A set of attributes describing the service itself (more comprehensive than ServiceName), such as service name, version, runtime environment, and so on.​
ServiceName​
text​
The name of the service that generated this Span.​
SpanID​
text​
The unique ID of the current Span.​
Start​
long​
Span start time.​
StatusCode​
text​
The execution result of the Span.​
StatusDescription​
text​
Supplementary description of the Span's execution result.​
TracelD​
text​
The TraceID of the entire call chain. All Spans for the same request share the same TraceID.​
TraceState​
text​
Custom trace context metadata.​
​
Attributes​
​
Field​
Type​
Description​
gen_ai.input.messages​
text​
The complete list of input messages sent to the model.​
gen_ai.provider.name​
text​
Name of the model provider.​
gen_ai.request.model​
text​
Name of the model specified in the request.​
gen_ai.tool.name​
text​
Name of the tool involved in this invocation.​
gen_ai.usage.cache_read.input_tokens​
long​
Number of input tokens hit in KV Cache.​
gen_ai.usage.input_tokens​
long​
Number of input tokens consumed by this request.​
gen_ai.usage.output_tokens​
long​
Number of output tokens consumed by this request.​
gen_ai.usage.reasoning.output_tokens​
long​
Number of output tokens consumed by reasoning.​
gen_ai.usage.total_tokens​
long​
Total number of tokens.​
session.id​
text​
Current session ID.​
session.name​
text​
Name of the current session.​
tls.app.type​
text​
Application type identifier, indicating which log application form this span belongs to.​
tls.plugin.version​
text​
Version number of the observability plugin.​
tool.error​
text​
Error message when tool execution fails.​
​
​
Last updated: 2026.09.14 11:19:21