agentleFS
talayashtalayash/spring-fleet/skills/debugging-runtime-logs/SKILL.md

debugging-runtime-logs

Skill2 starsChanged 44 days agoMITView on GitHub

Use when debugging a runtime failure in a locally-running fleet of Spring Boot microservices - correlates logs across services by a trace key, reconstructs the cross-service timeline, isolates the failing hop, and maps it back to source.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When something breaks in a multi-service dev run, the symptom usually appears in one service while the cause lives in another.

    line 8
  2. Distinctive:

    Run directly if you prefer:

    line 30
  3. Distinctive:

    Read the timeline as a story: Follow the request hop by hop.

    line 36
  4. Very specific:

    No plugin subagents (Codex): read agents/log-correlator.md and agents/fleet-explorer.md under the plugin root and do that work yourself.

    line 64

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Debugging Runtime Logs Across a Service Fleet

When something breaks in a multi-service dev run, the symptom usually appears in one service while the cause lives in another. This skill correlates logs across the whole fleet and ties the failure back to code.

Prerequisites

  • A spring-fleet.config.json exists (else run /fleet-init).
  • Services write to the configured logDir (see the spring-fleet-logging-setup skill if logs are scattered or console-only).

Procedure

  1. Get a correlation handle. Best case: an OTel trace_id (32-char hex) from the user's APM dashboard or a traceparent header, or a legacy sessionId / X-Request-Id from a failed request. Otherwise, start from the error message/stack the user pasted; extract a key from a nearby log line, preferring trace_id over sessionId.
  2. Dispatch the log-correlator agent with the config path and the trace value (or error snippet). It runs scripts/correlate_logs.py and returns one chronological cross-service timeline plus a failure-origin analysis.

    Run directly if you prefer:

    python "${CLAUDE_PLUGIN_ROOT}/scripts/correlate_logs.py" \
      --config ./spring-fleet.config.json --value <traceValue>
  3. Read the timeline as a story. Follow the request hop by hop. The first ERROR/exception in time order is the likely origin; everything after it is usually propagation. Watch the time gaps: a long gap before an error often means a timeout.
  4. Map the origin to code. Take the failing service + class from the log and open the source. For a cross-service cause, dispatch the fleet-explorer agent (or use the tracing-across-services skill) to confirm the call path.
  5. Report. State: what the user did, the cross-service timeline, the failure origin (service + file:line), how it surfaced upstream, and a ROOT-CAUSE HYPOTHESIS block: what the fault is, where in code to fix it, why the timeline supports that, your confidence, and a concrete suggested fix (snippet or behavior). Always include alternatives the evidence does not rule out. Call out any service with no log file; a missing log can hide the real cause.

Fallbacks

  • No trace key in logs: correlate by timestamp window + endpoint and say so.
  • Console-only logs: point the user at spring-fleet-logging-setup to get stable per-service log files (or, later, the /run tee command).
  • Empty result: the value may be wrong, or the request never reached the fleet. Widen with /logs --grep around the timeframe.

Outside Claude Code

  • ${CLAUDE_PLUGIN_ROOT} is the spring-fleet plugin root. Claude Code fills it in; in Codex it is the folder two directories above this SKILL.md.
  • No plugin subagents (Codex): read agents/log-correlator.md and agents/fleet-explorer.md under the plugin root and do that work yourself.
  • spring-fleet MCP tools: pass config_path (absolute path of the project's spring-fleet.config.json). Codex starts the server outside the project, so it cannot find the config on its own.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.