Analyze a trace in Lensflare
- If the user supplied a
traceId, use it. Otherwise calllensflare:queryTelemetryto find a relevant trace (filter byserviceName, time, or attributes). Pick the trace whose root span has the highestdurationUsor whosestatus = "error". - Call
lensflare:getTracewith the resolveddatasetIdandtraceId. If it returnsnull, double-check thetraceIdwithqueryTelemetry(traceId = "<id>") before reporting back. - Read
summary.spanCountandsummary.erroredSpanCount. If errors exist, lead with them: name + service +durationUs. - Walk
spansin order. Highlight the longest span, the deepest chain, and any span whosestatus = "error"or whose duration is more than 50% of its parent's. - Surface
relatedEventsonly when they materially explain a failure (e.g. an exception event on the failing span). - End with a one-line root-cause hypothesis and a suggested follow-up query. Example: "to see all requests with this error:
attributes.http.status_code = 500 and serviceName = \"api\"".
Source: voidhashcom/lensflare — distributed by TomeVault.