ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 3/5

sls-trace-analysis

查询阿里云SLS日志和ARMS调用链,结合源码和数据库进行全链路问题排查。 完整流程:查日志 → 画调用链 → 定位源码 → 排查数据库 → 给出修复方案。 Use when: 用户说「分析sls」「分析问题」或想排查业务服务/线上接口/用户请求的报错或异常。 触发示例:「分析sls」「帮我查一下这个trace_id」「分析一下这个trace_id」 「查一下这个用户的请求」「wusid 是 xxx」「uid xxx」 「查一下 /path/to/api 这个接口的报错」「帮我排查一下这个业务报错」「线上有个接口挂了」 「帮我分析一下这个报错的代码」「数据库报错了」「SQL超时」「查一下这个接口为什么慢」。 IMPORTANT: trace_id = 染色ID = 业务调用链ID = requestId,这些都是同一个东西, 统一用 trace_id 表述。用户提供的 trace_id 是业务系统的外部 trace,不是 OpenClaw 内部 session ID, 不要自行分析 trace_id 的来源或归属,必须调用此 skill 去 SLS/ARMS 查询。 NOT for: 查询OpenClaw自身状态、分析OpenClaw系统问题、搜索本地文件、openclaw内置命令。

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/ccrazyfish/sls-trace-analysis
Or

What This Skill Does

The sls-trace-analysis skill is a powerful diagnostic tool designed for high-efficiency, end-to-end problem investigation within distributed microservice architectures. It acts as an orchestrator that pulls data from Alibaba Cloud SLS (Log Service) and ARMS (Application Real-Time Monitoring Service) to reconstruct request flows using trace IDs. Beyond log aggregation, the skill autonomously transitions from observing raw logs and service call chains to deep-dive analysis, including source code inspection and database query performance verification. It is built to resolve production incidents by providing actionable remediation plans based on real-time observational data.

Installation

To add this skill to your OpenClaw agent, execute the following command in your terminal: clawhub install openclaw/skills/skills/ccrazyfish/sls-trace-analysis

Use Cases

This skill is indispensable for Site Reliability Engineers (SRE), backend developers, and DevOps teams. Use it when:

  • An end-user reports a failure and provides a specific request or tracking ID.
  • You need to debug "slow" API endpoints by identifying bottlenecks in the call graph.
  • A database error or timeout alert is triggered, and you need to trace it back to the originating service request.
  • You need to cross-reference application logs with infrastructure-level trace data to identify the root cause of an intermittent service failure.

Example Prompts

  1. "分析一下 trace_id f1b37e059a424e6a882a8b9f7d6e4c32,用户反馈接口报错。"
  2. "帮我排查一下 /api/v1/user/profile 这个接口为什么最近总是超时。"
  3. "线上有个服务挂了,帮我根据 uid 882910 查一下相关的业务请求日志。"

Tips & Limitations

  • Strict Interaction Model: The skill follows a strict conversational template. Do not deviate from the prompt requirements when providing parameters. Use specific keywords like trace_id, wusid, and path to ensure the logic flows correctly.
  • Automation First: The skill is designed to perform recursive investigation. When an issue is identified, it will automatically attempt to scan the code repository and analyze database queries. Avoid manual intervention unless requested.
  • Data Integrity: Every logstore query is presented individually. Do not attempt to "clean up" or merge log outputs as this may obscure critical timing or multi-service dependency issues.
  • Scope Warning: This tool is strictly for業務 (business) application logs and traces. It is NOT designed for analyzing the internal system state of OpenClaw or for general local file searching. Always verify that you are investigating business-level identifiers.

Metadata

Stars4017
Views1
Updated2026-04-11
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-ccrazyfish-sls-trace-analysis": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#sls#arms#debugging#sre#logging
Safety Score: 3/5

Flags: network-access, file-read, code-execution, external-api