You need to enable JavaScript to run this app.
Observability Platform

Observability Platform

Copy page
Download PDF
AI Agent observability
Claude Code trace monitoring
Copy page
Download PDF
Claude Code trace monitoring
Claude Code is a programming-specific AI agent from Anthropic that runs natively in the terminal. It can analyze the entire codebase, break down and plan requirements, edit local files, run terminal commands, self-test, fix issues, and execute tasks in a closed loop. Claude Code supports end-to-end development tasks, including coding, debugging, refactoring, and submitting PRs. This provides complete intelligent execution capabilities for R&D efficiency improvement and code engineering automation scenarios. This topic describes how to integrate Claude Code observability data into APMPlus and view trace monitoring.​
Prerequisites​
  • You have installed Claude Code, and the Claude command runs properly.​
  • You have obtained the information about the required configuration parameters for integrating Claude Code. The detailed parameters and acquisition methods are as follows:​
  • ​
    Parameter​
    Required​
    Description​
    --app-key​
    Yes​
    The authentication information of Server-side Monitoring. Although the App Key credential is independent of the integrated service type and data collection method, the App Key differs across workspaces. To obtain App Key, see How to obtain the AppKey for Server-side Monitoring authentication?.​
    --region​
    Yes​
    ID of the region for service integration, such as cn-beijing. For information about regions currently supported by Server-side Monitoring, see Server-launching region.​
    --service-name​
    Yes​
    The service name, such as claude-code-apmplus. The displayed service name in Server-side Monitoring. You can customize the service name based on your needs.​
    --version​
    No​
    Specifies the installation version. The default value is latest. Both 0.1.0 and v0.1.0 formats are supported.​
    --package-url​
    No​
    Overrides the download URL of the plugin package, typically used only for canary releases or troubleshooting.​
    --tos-base-url​
    No​
    Overrides the root TOS URL. The official release URL is used by default.​
    --no-launchctl​
    No​
    Skips writing launchctl environment variables on macOS and updates only the Claude settings.​
    ​
Procedure​
Step 1: Integrate Claude Code​
  1. Execute the following command to install the apmplus@apmplus-claudecode-plugin plugin in the ~/.claude directory.​
tip​
To upgrade or reinstall the apmplus@apmplus-claudecode-plugin plugin, execute the installation command again.​
  • Sample code for installing the latest version is as follows:​
  • ​
    curl -fsSL "https://apmplus-claudecode-plugin.tos-cn-beijing.volces.com/install.sh" | bash -s -- \​
    --region "cn-beijing" \​
    --app-key "your-appKey" \​
    --service-name "your-service-name"​
    ​
  • Sample code for installing a specific version is as follows:​
  • ​
    curl -fsSL "https://apmplus-claudecode-plugin.tos-cn-beijing.volces.com/install.sh" | bash -s -- \​
    --region "cn-beijing" \​
    --app-key "your-appKey" \​
    --service-name "claude-code" \​
    --version "0.1.0"​
    ​
  1. After the installation completes, restart Claude Code for the configuration to take effect.​
  1. Start a new conversation or tool call in Claude Code, and check the script output or configuration. If any of the following conditions is met, the installation is successful.​
  • APMPlus Claude Code Plugin installation complete is displayed in the installation script output, and claude plugin detects the apmplus@apmplus-claudecode-plugin plugin.​
  • The ~/.claude/settings.json file contains the APMPlus endpoint, service name, and preload path generated from Region and appKey.​
  • Go to APMPlus and query the Trace data for the corresponding service.name. In the Trace generated by the new conversation, the service name matches the installation parameters.​
Step 2: View observability data​
  1. Navigate to Service List and search for the integrated Claude Code by service name.​
  1. Click the service name to access the service details page. On the Trace analysis tab, view the Span list corresponding to the Claude Code service.​
  1. Click the target trace ID and switch to the LLM data or Properties tab to view the details of this request.​
  1. Switch to the Detailed logs of traces tab to view detailed logs of the Claude Code runtime process.​
FAQ​
If you encounter any of the following issues when installing or using the plugin, you can solve the issue with the corresponding recommended solution.​
​
Issue description​
Recommended solution​
Prompt: --region, --app-key and --service-name are required​
Required parameters in the installation command are missing. Add --region, --app-key, and --service-name, and then try again.​
Prompt: --endpoint is no longer supported​
Do not manually specify the endpoint. Instead, specify--region and --app-key, which can be automatically concatenated by the installation script.​
Prompt: --region should be a region id​
Enter the Region ID for --region only, such as cn-beijing. You do not need to enter a complete URL or the apmplus- prefix.​
Prompt: --app-key should be the appKey only​
Enter the appKey for --app-key only. You do not need to enter the complete URL or endpoint.​
Prompt: claude command is required​
Claude Code is not installed on the local device, or Claude is not in the PATH of the current shell.​
Failed to download the plugin package​
Check whether the TOS domain is accessible over the network, or use --package-url to point to an accessible plugin package URL.​
No Trace in APMPlus​
Confirm that Claude Code has been restarted, and check the region, appKey, service name, network egress, and the APMPlus query time range.​
The environment does not take effect after a macOS restart​
Execute the installation command again, or omit the --no-launchctl parameter to enable the script to write the launchctl environment synchronously.​
​
​
Last updated: 2026.06.29 16:00:09