aliyun-sls-trace

Resolve Alibaba Cloud SLS trace configuration and query trace responses by trace-id or custom query.

Updated Aug 31, 2024
One-click install
npx skills add https://github.com/iheCoder/Lib --skill aliyun-sls-trace
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aliyun-sls-trace
Source: https://github.com/iheCoder/Lib/tree/main/skill/aliyun-sls-trace
Command: npx skills add https://github.com/iheCoder/Lib --skill aliyun-sls-trace

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Work with Alibaba Cloud SLS tracing logs to manage list/detail/export tasks and perform trace troubleshooting. This skill helps when requests mention Aliyun/Alibaba Cloud trace logs, SLS log query, 链路追踪, or traceID-based debugging, resolving config from a built-in profiles file by default, and optionally loading from a Go constants file when provided.

Core Features & Use Cases

  • Resolve SLS configuration from built-in profiles with default prod and optional test previews.
  • Reuse bundled resolver/query scripts to handle endpoint/project/logstore/AKSK without hard-coding values.
  • Query trace response candidates and parse logs for key attributes, enabling trace-based debugging in production or testing environments.

Quick Start

Resolve the SLS config with the provided scripts and run a trace query by trace-id or custom query.

Frequently Asked Questions about aliyun-sls-trace

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query Alibaba Cloud SLS trace logs by traceID for debugging?

To query Alibaba Cloud SLS trace logs by traceID, use this skill to resolve your SLS configuration and run a trace query within a specified time range and logstore. It returns structured JSON output containing trace response candidates for production debugging.

Can I use a custom SLS query instead of a traceID to search trace logs?

You can use an arbitrary SLS query instead of a traceID to search trace logs. The skill accepts custom query strings alongside a specified time range and logstore, parsing the returned logs for key attributes to support trace-based troubleshooting.

Do I need to hardcode my Alibaba Cloud SLS endpoint and AKSK credentials to query traces?

You do not need to hardcode your Alibaba Cloud SLS endpoint, project, logstore, or AKSK credentials. The skill reuses bundled resolver scripts to automatically apply configuration from a built-in profiles file and optionally loads settings from an external Go constants file.

What is the best way to automate Alibaba Cloud trace log troubleshooting and export tasks?

The best way to automate Alibaba Cloud trace log troubleshooting is to use this skill's JSON-friendly output. It resolves SLS config and queries trace response candidates, enabling seamless integration with other automation tools for list, detail, and export tasks.

Does this SLS trace query skill support testing environments or only production logs?

This SLS trace query skill supports both production and testing environments. It resolves SLS configuration from built-in profiles that include default production settings and optional test previews, allowing you to query trace logs across different environments.

Why does my SLS trace query return empty results when searching by traceID?

Empty SLS trace query results often occur when the specified time range or logstore does not contain the traceID. Ensure your SLS configuration correctly resolves the target logstore and time window before executing the trace query to retrieve accurate response candidates.