Index of every page on this site: llms.txt
All skills
launchdarkly avatar

/investigate

@f0ee110 official
Run it yourself

Finds the root cause of a production problem from observability data (logs, traces, errors, sessions, metrics): scope and onset, what changed (deploys and flag changes), which host, version, route or flag variation is over-represented against a baseline, then trace, log and error evidence and blast radius. Use when the user reports a bug, an outage, an error or latency spike, an incident, or asks about patterns across application data.

Use this Skill: https://skilld.dev/gh/launchdarkly/ai-tooling/investigate

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

logs.md

≈1.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Investigating with logs

Load this file when the investigation touches application logs: error messages, log levels, the logs of one request, host or session.

When to reach for logs

  • The user quotes an error message or names a service and log level
  • You need verbatim evidence for a slice you already found (a host, a version, a route)
  • You have a trace ID or session ID and want everything it logged
  • You want to know when a message first appeared or how its rate changed

Logs are the best verbatim evidence and the worst overview. For "how many" and "which kinds", use search-log-patterns and search-aggregations first.

Group before you page (search-log-patterns)

search-log-patterns clusters the matching logs into templates with ids and numbers masked, each with a count and the newest example. One call replaces paging hundreds of lines.

  • environments and services with the exact values from get-keys (step 1 in SKILL.md), and query: "level=error" (the level key is level, not severity) plus the slice filter (host.name=<host>). An older server rejects environments and services here: put environment=<env> service_name=<svc> in query instead.
  • patternKeys: ["error.message"] templates an attribute instead of the message; adding service_name splits each pattern by service, which shows a failure shared by every service on one host.
  • It scans at most the newest 100,000 matching logs; when truncated is true, narrow the window or the filter.
  • One root error can appear as several templates with different wrapper prefixes. Group them by the innermost cause before you count.
  • Pattern first-seen times are clamped to your window. For the real onset, aggregate the template's words with search-aggregations over a wider window.

Count and trend (search-aggregations)

  • productType: "logs", environments and services, query: "level=error ...", groupBy: "service_name" or "host.name", compareTo: "1d" for the baseline.
  • Onset of one message: filter on its bare words, bucketCount 24 to 48 over a wide window, or Min of timestamp with bucketCount: 1.

Read lines (search-logs)

  • startDate is required; ISO 8601 with a timezone.
  • query takes bare words for message text (connection reset matches messages with both words, index-assisted) plus attribute filters. *x* and quoted phrases scan every message and are slow over long windows.
  • limit defaults to 20, at most 50 per page; follow page.next_cursor for more, but if you need more than a page or two, aggregate instead.
  • fields keeps only the attributes you need; fullAttributes: ["code.stacktrace"] reads a long value whole.
  • Pass environments and services with the exact values from get-keys (step 1 in SKILL.md). A trace_id lookup is the exception: drop services, keep environments, because one request crosses services and the downstream services' lines must appear.

Typical patterns

  1. Logs of one request: query: "trace_id=<id>", environments only (no services: the request crosses services), a window of a few minutes around the span.
  2. Logs of one host during the incident: search-log-patterns with environments, services and host.name=<host> level=error, then search-logs for two or three verbatim examples.
  3. Logs of one session: query: "secure_session_id=<id>", startDate at the session's created_at, endDate three hours later.
  4. Did this start with a deploy? Aggregate the message by the version key (from get-changes) and compare versions' shares.

Interpreting results

  • Quote log lines verbatim with their timestamp, service and host.
  • A burst marks an onset; a steady rate is a standing bug. Check with compareTo.
  • Error logs can far outnumber error spans when code logs failures without marking spans. Count both before quoting an impact number.

Common mistakes

  • Leaving out the environment and service, or listing every environment. Name the ones the question is about.
  • Paging search-logs to count. Use search-log-patterns or search-aggregations.
  • Filtering on a key you have not checked with get-keys. A bad clause is dropped silently and the result gets wider.
  • Using message="*x*" when bare words would do.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning2d3 checks · Risk SAFE
  • Gen Agent Trust Hub2d

    This skill provides specialized instructions for investigating production outages and performance issues using the LaunchDarkly observability platform. It provides a structured methodology for identifying root causes through log analysis, trace inspection, and error grouping, utilizing the official LaunchDarkly MCP server.

  • Socket2d

    No alerts

  • Snyk2d

    Risk: MEDIUM · 1 issue

Signed by skilld at f0ee110. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 days ago
compatibility
Requires the remotely hosted LaunchDarkly MCP server
metadata
{
  "author": "launchdarkly",
  "version": "0.5.0"
}

README badge

README badge for launchdarkly/ai-tooling/investigate