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

Torch Log Service

Copy page
Download PDF
Coding Agent log app
OpenCode observability
Copy page
Download PDF
OpenCode observability
This topic introduces OpenCode observability, an LLM observability log application available in TLS application marketplace.​
Overview​
The OpenCode observability application in TLS provides an overview, trace analysis, session analysis, and token analysis services for OpenCode logs.​
After integrating the TLS OpenCode observable log application, it listens to OpenCode events. This collects user input, agent and model interaction data, tool call details, and token consumption.​
Monitoring chart details​
The monitoring chart details in the TLS OpenCode observability application are as follows:​
  • Homepage​
  • ​
    Type​
    Chart​
    Request overview​
    Session count, conversation count, model request count, tool invocation count, request trends​
    Cost overview​
    • Total tokens, input tokens, output tokens​
    • Cache Read Tokens, Reasoning Tokens​
    • Token usage trends, model invocation trends​
    Tool overview​
    • Top 10 tool invocations, top 10 tool invocation failures​
    • P90 tool invocation duration, tool invocation trends​
    • Successful invocations, failed invocations​
    Model performance overview​
    • Top 10 model invocation distributions, model invocation duration P90​
    • Provider invocation distribution, provider invocation duration P90​
    ​
  • Trace analysis​
  • ​
    Type​
    Chart​
    Homepage​
    Total trace count, total token consumption, average tokens, P90 duration​
    Trace analysis​
    Trace call chain analysis​
    ​
  • Session analysis​
  • ​
    Chart​
    Description​
    Homepage​
    Session count, total token consumption, model request count, average session tokens​
    Session analysis​
    By default, detailed conversation analysis is displayed for the past 30 minutes​
    ​
  • Token analysis​
  • ​
    Chart​
    Description​
    Homepage​
    • Total Tokens, Input Tokens, Input Tokens (excluding Cache), Output Tokens​
    • Cache Read Tokens, Reasoning Tokens​
    • Top 10 conversations by token consumption, Top 10 models by token consumption, Token category distribution​
    ​
  • Topic list​
  • Display the project and topic for trace logs.​
Integrate log applications​
You can first visualize integration of OpenCode log applications in the TLS console, and then install the OpenCode plugin to collect data.​
You can also install the OpenCode plugin first and then complete log application access based on the authentication mode.​
  • AK/SK mode: Automatically integrate log applications.​
  • API Key mode: Integrate OpenCode applications in the TLS console first to obtain the required parameters.​
Restrictions​
​
Category​
Description​
Software limits​
The server deploying OpenCode must have NPM and Node.js 22 or later installed.​
Region restriction​
The server deploying OpenCode and TLS must be in the same region to ensure network connectivity.​
Authentication method​
Configure OpenCode to access TLS using the following authentication methods:​
  • AK/SK: AccessKey ID and AccessKey Secret for Volcengine accounts.​
  • 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.​
​
Install the OpenCode plugin​
  1. Log in to the server where OpenCode is deployed.​
  1. Run the following commands based on different installation methods.​
  • ​
    One-click installation
    Interactive installation
    ​
    Supports the following two modes:​
    • AK/SK mode​
    • When you use the AK/SK mode to install the plugin, the system automatically creates an OpenCode log application task in the TLS console. After deployment, you can log in to the TLS console to view relevant observation data or manage connected applications directly.​
    • ​
      AGENT_NAME=opencode ​
      npm exec -y \​
      --registry=https://registry.npmjs.org/ \​
      --package=@volcengine/tls-observer-$AGENT_NAME-install@latest -- \​
      tls-observer-$AGENT_NAME-install \​
      --non-interactive \​
      --force \​
      --region cn-beijing \​
      --project-name <project-name> \​
      --app-name <log-app-name> \​
      --ak <tls-ak> \​
      --sk <tls-sk>​
      ​
    • API Key mode​
    • When you use the API Key mode to install the plugin, you need to complete the following steps in the TLS console in advance:​
    1. Create a project to manage OpenCode log application observability data. For details, see Log project.​
    1. Integrate the OpenCode log application. For details, see Connect OpenCode to the log application.​
    1. In the access management for the OpenCode log application, view and obtain the log topic ID marked with OPENCODE under the corresponding project.​
    • ​
      AGENT_NAME=opencode​
      npm exec -y \​
      --registry=https://registry.npmjs.org/ \​
      --package=@volcengine/tls-observer-$AGENT_NAME-install@latest -- \​
      tls-observer-$AGENT_NAME-install \​
      --non-interactive \​
      --force \​
      --region cn-beijing \​
      --trace-topic-id <trace-topic-id> \​
      --api-key <tls-api-key>​
      ​
    ​
  • Description of parameters:​
  • ​
    Parameter categories​
    Parameters​
    Description​
    Common parameters​
    region (required)​
    The region where TLS is located, such as cn-beijing.​
    AK/SK mode parameters​
    Project name (optional)​
    The project name for TLS.​
    If not specified, TLS automatically creates the following project and topic to store related data.​
    • Project: opencode_observability.​
    • Topic: Application integration name_trace.​
    ​
    app-name(optional)​
    The access name for OpenCode log application in TLS.​
    If not specified, the default name opencode-observability_<random suffix> is used.​
    • Only supports Chinese, lowercase letters, numbers, underscores (_), and hyphens (-).​
    • Can not start or end with a hyphen (-) or underscore (_).​
    • Length limit: 3-57 characters.​
    ​
    ak (required)​
    AccessKey ID of the Volcano Engine account.​
    ​
    sk (required)​
    AccessKey Secret of the Volcano Engine account.​
    API Key mode parameters​
    trace-topic-id (required)​
    It is the log topics ID with the OPENCODE tag and it is automatically created by TLS.​
    ​
    api-key (required)​
    The api-key credential of TLS.​
    ​
  1. After the plugin is installed, restart the OpenCode service.​
Connect OpenCode to the 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 > LLM applied observability.​
  1. Click Integrate LLM application to enter the Integrate LLM application tab.​
  1. Configure the following access parameters, and then click Create app.​
  • ​
    Parameters​
    Description​
    Select LLM application​
    Select the LLM application to connect, such as OpenCode.​
    Region​
    Select the region where the log project is located.​
    Log project​
    Select the project where data will be stored.​
    After connecting the OpenCode application, TLS will automatically create a log topic named application name_trace under this project to store relevant data.​
    Application name​
    Name of the application integration.​
    • Only Chinese characters, letters, numbers, underscores _, and hyphens - are allowed.​
    • Can not start or end with a hyphen -​
    • Must be 3–57 characters long.​
    • Can not start with tls_, tos_, or a reserved prefix.​
    Description​
    Description of the application integration. Character limit: 0–128 characters​
    ​
  1. Once connected successfully, available integration methods are displayed. You can copy Prompt with one click.​
  1. (Optional) Install the OpenCode plugin.​
  • If you have not installed the OpenCode plugin, see Install the OpenCode plugin to install plugin. When installing the plugin, notice the following parameters:​
  • app-name: Ensure consistency with the name created during application integration.​
  • project-name: Ensure consistency with the project name selected during application integration.​
  • trace-topic-id: Ensure consistency with the log topic ID automatically created by TLS named IntegrationName_trace.​
Update plugin​
To use the latest version of the OpenCode plugin or reconfigure TLS application integration, use the following command:​
  • Add the parameter --skip-tls-config to reinstall the latest version while retaining the original TLS configuration.​
  • Remove --skip-tls-config when reconfiguring TLS to delete the original TLS configuration.​
​
AGENT_NAME=opencode ​
npm cache clean --force​
npm exec -y --prefer-online \​
--registry=https://registry.npmjs.org/ \​
--package=@volcengine/tls-observer-$AGENT_NAME-install@latest -- \​
tls-observer-$AGENT_NAME-install --force --skip-tls-config​
​
Manage my applications​
After the log application is successfully connected, you can manage connected log applications as follows:​
  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 > LLM applied observability.​
  1. Go to the LLM applied observability tab. In the Actions column of the corresponding log application, you can perform the following management actions:​
  • ​
    Actions​
    Description​
    Edit access application​
    Click the edit icon to open the Edit dialog, where you can update the app name and Description of the access application.​
    View access configuration​
    Click the settings icon to open the Interated configuration dialog, where you can view access methods and related Prompt information.​
    Delete application​
    Click the delete icon, confirm the details in the delete application dialog, and click Delete again to remove the access application.​
    ​
​
Last updated: 2026.07.31 18:10:16