# Trace debugging

> Trace debugging is an open-source agent skill for developer tools. Follows one trace ID across services in Graylog to find where a request failed. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/Pranavj17/mcp-server-graylog/tree/main/skills/trace-debugging
- **Repository:** https://github.com/pranavj17/mcp-server-graylog
- **GitHub stars:** 6
- **License:** MIT
- **Skill name:** trace-debugging
- **Collection:** https://github.com/Pranavj17/mcp-server-graylog
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

This skill guides an agent through investigating a single request by its trace ID in Graylog logs. It walks through pulling every log tagged with the ID over a time window, locating the first error or fatal entry, and noting latency gaps that hint at a hung dependency.

For each error span the agent pulls neighboring log lines from the same pod, since the real cause often sits a few seconds before the error message. It then assembles a timeline covering the originating service, trace duration, error order and whether the failure started downstream or at the entry point. When a trace is very large, the skill tells the agent to hand the work to a separate analyzer subagent instead of loading hundreds of raw lines.

The workflow relies on the trace_request and get_surrounding_logs tools exposed by the companion Graylog MCP server. The skill also covers common pitfalls such as overly narrow time windows, log lines missing the trace ID, reused IDs and clock skew between hosts.

## When your agent uses it

> Use when investigating a specific trace_id — following a single request across services to understand where it failed, hung, or behaved unexpectedly. Triggers on "trace_id", "follow this request", "distributed trace", "trace across services", "what happened to request X".

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/Pranavj17/mcp-server-graylog/tree/HEAD/skills/trace-debugging)
- [License: MIT](https://github.com/Pranavj17/mcp-server-graylog/tree/HEAD/skills/trace-debugging)

## Features

- **Trace pulling:** Retrieves all Graylog logs tagged with a given trace ID within a chosen time window.
- **Failure span detection:** Locates the first error or fatal entry and flags latency gaps between spans.
- **Surrounding context lookup:** Fetches nearby same-pod log lines to find the likely root cause before the error.
- **Timeline assembly:** Builds a chronological summary of error spans and how the failure propagated.
- **Large trace handling:** Switches to a subagent for traces with many logs or spanning many services.
- **Common pitfall guidance:** Covers narrow windows, untagged log lines, reused IDs and clock skew.

## Good for

- Find out where a specific request failed across microservices
- Explain why a request with a given trace ID hung
- Summarize the error chain for a trace ID copied from a dashboard
- Identify the root-cause log line before a timeout error
- Check how many downstream services were affected by one failed request

## Install

### Claude Code

This skill ships in the `graylog-log-search` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add Pranavj17/mcp-server-graylog
/plugin install graylog-log-search@pranavj17
```

Or copy only this skill to `~/.claude/skills/trace-debugging`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Pranavj17/mcp-server-graylog.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/trace-debugging &&
cp -R "$tmp/skills/trace-debugging" ~/.claude/skills/trace-debugging &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/trace-debugging` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/trace-debugging` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Pranavj17/mcp-server-graylog.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/trace-debugging &&
cp -R "$tmp/skills/trace-debugging" ~/.agents/skills/trace-debugging &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/trace-debugging` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/trace-debugging` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Pranavj17/mcp-server-graylog.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/trace-debugging &&
cp -R "$tmp/skills/trace-debugging" ~/.cursor/skills/trace-debugging &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/trace-debugging` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/Pranavj17/mcp-server-graylog.git --path skills/trace-debugging
```

Or copy the folder to `~/.gemini/skills/trace-debugging` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/trace-debugging`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Pranavj17/mcp-server-graylog.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/trace-debugging &&
cp -R "$tmp/skills/trace-debugging" ~/.copilot/skills/trace-debugging &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/trace-debugging` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/Pranavj17/mcp-server-graylog.git
```

Then copy `mcp-server-graylog/skills/trace-debugging` into your agent's skills folder as `trace-debugging`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Trace debugging trigger?

It triggers when you mention a trace_id, ask to follow a request, refer to a distributed trace, or ask what happened to a specific request.

### What does Trace debugging need to run?

It expects the Graylog trace_request and get_surrounding_logs tools, which the companion Graylog MCP server provides, along with a trace ID.

### What does Trace debugging change in the project?

It only guides investigation and returns a synthesis to the user; it does not modify code or logs.

### What if the trace is very large?

The skill says to dispatch the graylog-trace-analyzer subagent when there are over 200 logs or more than five services.

### How do I install Trace debugging in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/trace-debugging to use it in all your projects, or to .claude/skills/trace-debugging in one project. Or install the graylog-log-search plugin, which includes it: /plugin marketplace add Pranavj17/mcp-server-graylog, then /plugin install graylog-log-search@pranavj17.

### Does Trace debugging run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Trace debugging?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Trace debugging?

The closest alternatives to Trace debugging are Graylog, Incident triage, Troubleshooting, Debug ingestion and Trace the flow.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Graylog](https://ai-powered.com/skills/graylog): Graylog is an open-source agent skill for developer tools.
- [Incident triage](https://ai-powered.com/skills/incident-triage): Incident triage is an open-source agent skill for developer tools.
- [Troubleshooting](https://ai-powered.com/skills/troubleshooting): Troubleshooting is an open-source agent skill for developer tools.
- [Debug ingestion](https://ai-powered.com/skills/debug-ingestion): Debug ingestion is an open-source agent skill for developer tools.
- [Trace the flow](https://ai-powered.com/skills/trace-the-flow): Trace the flow is an open-source agent skill for developer tools.
- [Agent introspection debugging](https://ai-powered.com/skills/agent-introspection-debugging): Agent introspection debugging is an open-source agent skill for developer tools.
- [Phoenix CLI](https://ai-powered.com/skills/phoenix-cli): Phoenix CLI is an open-source agent skill for ai models and llm tooling.
- [Interactive debugging](https://ai-powered.com/skills/interactive-debugging): Interactive debugging is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/trace-debugging
