Trace

From dlt/faultline · View interactive version

Trace is an AI agent skill from the GitHub repository dlt/faultline. Inspect Faultline APM traces — slow endpoints or a specific request's span breakdown.

How to use this skill

Skill file

Investigate APM traces using list_traces and get_trace.

Decide which mode from $ARGUMENTS:

1. Call list_traces with slow_only: true and the endpoint filter if one was given.

2. Render a short table: id | endpoint | duration_ms | db_runtime_ms | db_query_count | created_at.

3. Ask which trace the user wants to drill into, or call get_trace directly on the slowest one if a single result.

1. Call get_trace with id.

2. Group the spans by category (SQL / view / HTTP / Redis). Surface the top N spans by duration.

3. Flag patterns: many similar SQL spans (likely N+1), a single span dominating total duration, or external HTTP that exceeds the rest combined.

If either tool returns "APM is disabled. Set enable_apm = true to use trace tools.", tell the user to set c.enable_apm = true in their Faultline initializer. If it returns "APM tables not present", the migration hasn't been run yet.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.