Λογότυπο Performance Rca

Performance Rca

Οργανισμός
grafana
performance-rca

Investigates CPU, memory, and contention problems with Grafana Pyroscope profiles via the gcx CLI. Compares affected and baseline workloads, locates changed application stacks, and tests root-cause hypotheses against symptom and change evidence. Use when a service shows high CPU, growing memory, GC pressure, lock contention, or hot functions, when code regressed after a deploy, or when given a suspect service, flame graph, trace, or profiling anomaly report. For profiling setup use pyroscope; for profilecli-based analysis use profilecli-insights.

Επισκόπηση

Εκδότηςgrafana
Αποθετήριοskills
Όνομα δεξιότηταςperformance-rca
Αστέρια
296
Forks
29
Συνοδευτικά αρχεία
1
Άδεια χρήσηςApache-2.0
Σύνδεσμοι
  • Οδηγίες σε Markdown

    Ένα αρχείο SKILL.md που το μοντέλο φορτώνει όταν χρειάζεται, ώστε να καταναλώνει token μόνο όταν ένα αίτημα είναι πράγματι σχετικό.

  • Λειτουργεί με οποιοδήποτε LLM

    Οι δεξιότητες AI είναι απλό Markdown, όχι κώδικας για συγκεκριμένο πάροχο, επομένως αυτή η δεξιότητα λειτουργεί με GPT, Claude, Gemini, Grok ή ένα τοπικό μοντέλο.

  • 1 συνοδευτικά αρχεία

    Σενάρια, πρότυπα και υλικό αναφοράς που μπορεί να διαβάζει το μοντέλο καθώς εργάζεται. Τα αρχεία είναι μόνο για ανάγνωση και δεν εκτελούνται ποτέ.

  • Ανοιχτού κώδικα

    Δημοσιεύτηκε από grafana στο GitHub. Διαβάστε το πηγαίο περιεχόμενο πριν εγκαταστήσετε τη δεξιότητα.

Εγκατάσταση

Εγκαταστήστε τη δεξιότητα AI Performance Rca στο TypingMind για να τη χρησιμοποιείτε με οποιοδήποτε LLM ή προσθέστε τη σε άλλον πράκτορα AI που διαβάζει αρχεία SKILL.md.

1

Εγκατάσταση στο TypingMind

Το TypingMind εγκαθιστά μια δεξιότητα απευθείας από τον φάκελό της στο GitHub — διαβάζει το SKILL.md, συγκεντρώνει τα συνοδευτικά αρχεία σε πακέτο και αποθηκεύει το αποτέλεσμα τοπικά.

  1. Ανοίξτε την εφαρμογή και μεταβείτε στα Πρόσθετα → Δεξιότητες.
  2. Επιλέξτε «Εγκατάσταση από GitHub».
  3. Επικολλήστε το παρακάτω URL του φακέλου της δεξιότητας και επιβεβαιώστε.
    https://github.com/grafana/skills/tree/main/skills/grafana-lgtm/performance-rca
  4. Ενεργοποιήστε τη δεξιότητα σε κάθε συνομιλία όπου θέλετε να είναι διαθέσιμη.
Πρόσθετα → Δεξιότητες → Νέα δεξιότητα → Από URL του GitHub, έπειτα επικολλήστε το URL του φακέλου και πατήστε «Συνέχεια».
2

Εγκατάσταση σε άλλον πράκτορα AI

Κάθε πράκτορας AI που διαβάζει τη μορφή Agent Skills μπορεί να χρησιμοποιήσει αυτή τη δεξιότητα — αντιγράψτε τον φάκελο στον κατάλογο δεξιοτήτων του.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/grafana/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/grafana-lgtm/performance-rca .claude/skills/performance-rca
Επανεκκινήστε το Claude Code μετά την αντιγραφή, ώστε να εντοπίσει τη νέα δεξιότητα.

Χρησιμοποιήστε τη στο TypingMind

Ενεργοποιήστε τη δεξιότητα Performance Rca σε οποιαδήποτε συνομιλία στο TypingMind και το μοντέλο αναλαμβάνει τα υπόλοιπα. Το όνομα και η περιγραφή της περιλαμβάνονται στην προτροπή συστήματος και, μόλις προκύψει ένα σχετικό αίτημα, το μοντέλο φορτώνει μόνο του τις πλήρεις οδηγίες — δεν χρειάζεται ποτέ να την καλείτε χειροκίνητα και δεν καταναλώνει token μέχρι να χρησιμοποιηθεί πραγματικά.

Το μοντέλο φορτώνει αυτόματα τη δεξιότητα Performance Rca μόλις λάβει ένα σχετικό αίτημα.

Λειτουργεί με οποιοδήποτε μοντέλο AI

Οι δεξιότητες AI είναι απλές οδηγίες Markdown και όχι κώδικας για συγκεκριμένο πάροχο, οπότε η δεξιότητα Performance Rca δεν περιορίζεται στο μοντέλο για το οποίο γράφτηκε. Εγκαταστήστε τη μία φορά στο TypingMind και χρησιμοποιήστε τη με GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ή ένα τοπικό μοντέλο που εκτελείτε εσείς — πάντα με τα δικά σας κλειδιά API.

  • Φόρτωση μόνο όταν χρειάζεται

    Η προτροπή συστήματος περιλαμβάνει μόνο το όνομα και την περιγραφή. Οι οδηγίες ανακτώνται με το πρώτο σχετικό αίτημα, οπότε μια δεξιότητα που δεν χρησιμοποιείται δεν έχει κόστος.

  • Αλλάξτε μοντέλα κατά τη συνομιλία

    Επειδή η δεξιότητα αποτελείται από οδηγίες και όχι από κώδικα, η αλλαγή μοντέλου δεν επηρεάζει τη λειτουργία της — το επόμενο μοντέλο διαβάζει το ίδιο αρχείο SKILL.md.

Οδηγίες δεξιότητας

Αυτό είναι το περιεχόμενο του αρχείου SKILL.md που φορτώνει το μοντέλο. Διαβάστε το πριν από την εγκατάσταση — μια δεξιότητα αποτελείται από οδηγίες που θα ακολουθήσει το μοντέλο σας.

Performance RCA

Explain the observed performance problem: which workload changed, which code path accounts for it, and what evidence supports the mechanism. A hotspot is a location; an anomaly is a lead; neither alone proves a root cause. Stop at the strongest supported conclusion, including an inconclusive result. Code changes and proactive optimization are separate tasks.

Investigation contract

  1. Follow Sections 1–5 in order. Reuse verified evidence from an earlier step or referring investigation; do not repeat discovery merely to satisfy the sequence. Establish each step's prerequisites before interpreting its result.
  2. Fix the context, datasource, UTC windows, selectors, and profile type before comparison. Discover missing identifiers; never invent them. Record any justified change to the scope or comparison.
  3. Qualify the control in Section 2 before claiming a regression. Without one, continue only to current cost attribution and label the comparison missing.
  4. Distinguish empty results, unsupported capabilities, and query failures. Apply Section 1's exits to the affected profiling path; use its documented fallbacks only when their prerequisites hold.
  5. Select output formats explicitly: JSON for discovery/metrics, table to rank functions, DOT to trace callers and callees, and pprof for export. Retain diagnostics and limits.
  6. Always produce Section 5's report, including after an exit. Fill unsupported fields with unknown, not measured, or not applicable, plus a reason. A missing measurement must never become evidence that the service is healthy.

1. Preserve the question and check usable profiles

Reuse the context, datasource, service, symptom, incident window, deployment facts, and trace/profile links supplied by the user or a referring skill. Pin absolute UTC incident and baseline times. Derive a missing incident interval from timestamped symptom evidence, or ask for it before querying. Carry the same --context <context> on remote commands (omitted below), and pass the datasource UID explicitly. Keep the investigation read-only; do not switch contexts or change collection.

bash
gcx help-tree profiles -o text

The examples below need gcx v1.3.0 or later; check with gcx --version. If gcx is missing or older, ask the user to install or upgrade it from https://github.com/grafana/gcx before continuing. Do not guess command renames or silently drop time filters. Commands, flags, and output formats can still be unsupported by the backend; Section 4 and the advanced reference describe those fallbacks.

bash
# Discover only if the datasource UID is unknown; choose the target environment.
gcx datasources list -t grafana-pyroscope-datasource -o json
gcx profiles data-range -d <pyro-uid> -o json
gcx profiles list-profile-types -d <pyro-uid> \
  --from <incident-from> --to <incident-to> -o json

CLI support does not imply backend support. data-range returns tenant-wide dataIngested, oldestProfileTime, and newestProfileTime (Unix milliseconds; zero means unknown). These bounds do not prove that the selected service or lens has continuous coverage. Do not assume a fixed retention period.

Apply these outcomes before proceeding. Every exit stops the affected profile queries and produces the Section 5 report; other usable signals may continue through gcx's bundled debug-with-grafana skill (gcx agent skills get debug-with-grafana) with the missing-evidence question made explicit.

  • EXIT A — profiling unavailable: no target datasource, missing access, or a required CLI capability is unavailable. Record the exact limitation; use gcx login and gcx config check for missing setup or access, or a compatible gcx build for a CLI mismatch.
  • EXIT B — no ingestion reported: a successful stats response says dataIngested: false. Report the instrumentation/data gap, not service health.
  • EXIT C — incident not covered: the incident has no overlap with known queryable bounds. Report both ranges; do not replace the incident with today. For partial overlap, analyze only that overlap, record the coverage gap, and limit conclusions to the observed interval.
  • EXIT D — no usable incident profiles: after checking the selector, window, and lens against discovered facts, incident samples remain absent or zero. A missing baseline alone is handled in Section 2, not by this exit. Report the unresolved coverage/instrumentation gap, not proof of zero cost.

Continue with scoped checks when stats are absent, unsupported, or have unknown bounds. Missing stats alone must not block usable type/profile queries. These queries still need matching samples before they can support attribution.

For query errors, retain the operation and diagnostic. Correct a demonstrated selector/flag mistake; use a documented fallback for unsupported capabilities. Do not retry authentication failures or vary selectors blindly. A failed query is not an empty successful result.

2. Choose the lens and a qualified comparison

Copy exact profile type IDs from discovery, including their units. Discover labels rather than assuming Prometheus jobs, Tempo service names, Kubernetes workloads, and Pyroscope service_name have identical values.

SymptomAvailable lens to look forInterpretation limit
CPU high or CPU-bound latencyCPU timeDoes not measure all request latency, scheduling delay, or throttling
Allocation/GC pressureAllocated bytes/objectsChurn is not retained heap or a memory leak
Growing heap/OOMIn-use bytes/objects, alongside allocationsLive-heap samples are snapshots; not process RSS, native memory, or retention ownership
Contention or blocked workMutex/block delay and countsRuntime-specific sampling and attribution; not CPU time
Suspected goroutine/thread leakGoroutine/thread counts and stacksGrowth alone is not proof of leaked work

If the needed lens is absent, record the instrumentation gap; do not substitute CPU to rule out waiting or allocations to prove a leak.

A baseline must represent expected behavior, not simply precede the incident. Prefer equal-duration intervals with comparable request mix/rate, replica count, collection coverage, runtime, and sampling settings. Diurnal workloads may need a matching earlier time of day. Check profile types and data in the baseline window too. Compare an unaffected peer when no historical baseline is suitable. Without a qualified control, report current cost locations without claiming a regression. A stable but inefficient hot path may still explain a new symptom under increased load; an unchanged profile shape does not exonerate it.

For a deployment comparison, keep stable workload labels fixed, but select the old version/pod for the baseline when the incident's version/pod did not exist. Record both selectors and why they are comparable. Never compare an absent old pod/version with a populated new one and call it an infinite regression.

An anomaly result can supply the service, lens, onset, affected labels, and a candidate baseline. Preserve its link, interval, observed/expected values and score if supplied; validate them with profiles and symptom evidence. Read advanced analysis for the anomaly entry path; it requires no anomaly detector to run this skill.

3. Localize the change: service → workload slice

Start with the known suspect, rather than a tenant-wide leaderboard. If the service is unknown, discover service_name values with profiles labels, then rank within the known environment; use a tenant-wide query only if necessary.

bash
gcx profiles labels -d <pyro-uid> \
  --from <incident-from> --to <incident-to> -o json
gcx profiles labels -d <pyro-uid> --label service_name \
  --from <incident-from> --to <incident-to> -o json
# Establish onset and coverage; repeat for the baseline window.
gcx profiles metrics -d <pyro-uid> '{service_name="<suspect>"}' \
  --profile-type <lens> --from <incident-from> --to <incident-to> -o json
# Pick a discovered label that can distinguish affected/unaffected workloads.
gcx profiles metrics -d <pyro-uid> '{service_name="<suspect>"}' \
  --profile-type <lens> --from <incident-from> --to <incident-to> \
  --top --group-by <label> --limit 20 -o json

Use profiles series to discover actual label combinations for a service without requiring a profile type. See scoped series discovery for label projection. Tenant-wide label inventories alone do not prove labels coexist on the suspect.

Repeat the chosen grouping for the baseline. Leaderboards are capped candidates, not a fleet census; missing groups may have fallen outside the limit. A single group establishes no peer comparison. Similar totals do not establish uniform per-instance behavior, and the largest group may simply serve more traffic or contain more replicas. Use request counts or replica exposure from existing metrics when needed; if unavailable, state the confounder. Do not use a fixed ratio threshold to declare a slice anomalous.

Use time-series values to check persistence/onset; --top collapses the window. Keep units and aggregation semantics explicit, especially for live-heap or count snapshots. Do not sum snapshot values into "bytes allocated" or infer request-normalized cost from raw profile totals.

4. Locate the changed application stack

Run both queries for the incident selector below and for the qualified baseline selector/window. Omit the slice matcher when analyzing the whole service.

bash
# Rank functions.
gcx profiles query -d <pyro-uid> \
  '{service_name="<suspect>",<label>="<value>"}' \
  --profile-type <lens> --from <incident-from> --to <incident-to> -o table
# Trace callers and callees of the ranked functions.
gcx profiles query -d <pyro-uid> \
  '{service_name="<suspect>",<label>="<value>"}' \
  --profile-type <lens> --from <incident-from> --to <incident-to> -o dot

Take function rankings and shares from the table. It aggregates each function and lists the top 20 by SELF. Its PERCENTAGE column is SELF divided by the profile total, not the function TOTAL share. The table omits everything past the top 20, so to total the share of a set of functions, such as all GC functions, sum SELF over the full profile from -o json or a pprof export. Names longer than 60 characters are cut and end in ...; take the full name from the matching DOT node before reporting or interpreting it.

Use DOT for caller/callee context, source locations, and full function names. Its nodes can be single source lines (file.go:line), so one function may appear as several nodes. A label splits the function name across lines, starting with the last element of its package path, then reads self (%) of cumulative (%), or a single value when they are equal. Do not rank functions or read self shares from DOT nodes. gcx falls back to table output with a warning when the backend explicitly rejects DOT as unsupported or returns a flame graph instead. Other errors still fail the query. Inspect the returned format and retain stderr. JSON encodes flame-graph wire data, not the human function table; agent output may instead reference a spill file that must be read.

DOT is pruned by default; dotted edges can skip intermediate frames. When caller context is missing, repeat the same query with -o dot --max-nodes 250 in both windows. This raises the node limit; it does not guarantee an unpruned graph. Neither format can rule out a missing path. For ambiguous attribution or numerical differences, read pprof comparison and export both profiles. Do not assume an exported profile repairs collection gaps.

Interpret the evidence with these constraints:

  • Compare absolute cost and share in each window, with units and a denominator. Equal shares can hide doubled cost; larger shares can reflect other work disappearing. Percentages are not request latency or proof of regression.
  • Self/flat means work at that frame; total/cumulative includes descendants. Use caller/callee context to locate a meaningful application path. Ancestor totals overlap: do not add them or assign runtime work to a guessed caller.
  • Runtime symbols suggest mechanisms to test. mallocgc suggests allocation work; GC workers may run separately from allocation sites; nanotime alone does not prove busy-waiting. CPU samples in futex/locks do not measure time asleep. Confirm waiting with a supported wait lens and other evidence.
  • In Go, heap stacks identify allocation sites, not the object retaining references. Mutex profiles attribute contention to the holder/unlock path; block profiles to the waiter. Verify the actual runtime semantics before transferring this interpretation to another language or collector.

When a matching checkout/build is available, inspect the implicated function to validate the mechanism. Read profile locations and verified deployment revision metadata; do not assume a Build ID is a Git SHA or that service_repository always exists. Report file:line only when symbolization and revision support it; otherwise retain function-level attribution and say what is missing. Do not edit source as part of this investigation.

5. Test the cause and report

Carry the suspect path back to the original symptom. Use the relevant evidence through gcx's debug-with-grafana skill: request/CPU/heap trends, throttling, queueing, dependency latency, logs, configuration or deployment changes. Reuse existing findings; query only what can distinguish the leading explanation from a material alternative. For a supplied request, see trace correlation.

A deployment timestamp or detector score is correlation. Strengthen a causal claim with matching onset, a specific mechanism, affected/unaffected controls, and repeatable differences or an already-observed recovery. Do not perform a rollback or load test merely to validate the hypothesis.

Stop when the user's question is answered or missing evidence prevents further attribution. Return a root cause only when the mechanism and symptom connection are supported; otherwise return a suspected cause, cost location, or inconclusive result. Never turn "not observed in these profiles" into "not in this service".

Use this report for every outcome. Keep the field names and order; add details under Evidence only when needed to support the conclusion. A blocked or empty investigation is inconclusive, with the exit and missing evidence recorded. Without a qualified baseline, report measured cost locations without regression claims. Unknown fields remain explicit; do not fill them with guessed values.

text
Conclusion:     <established cause | suspected cause | cost location |
                 inconclusive> — <answer to the original question>
Exit:           <A | B | C | D | none> — <reason, if applicable>
Scope:          <context, datasource UID, service>
Lens:           <exact profile type and units>
Incident:       <UTC from/to; exact selector; observed coverage>
Baseline:       <UTC from/to; exact selector; or unavailable with reason>
Control:        <why comparable; workload/collection differences or gaps>
Slice:          <affected label/value; evidence of scope or unknown>
Location:       <application stack; file:line and revision only if verified>
Cost:           <incident vs baseline absolute values, units, aggregation>
Share:          <incident vs baseline; self/cumulative and denominator>
Normalization:  <method and measured denominator | not applied, with reason>
Mechanism:      <supported explanation or explicitly labeled hypothesis>
Evidence:       <profile artifacts/links and corroborating symptom evidence>
Counterevidence: <alternatives checked and results | not checked, with reason>
Confidence:     <high | medium | low> — <reason tied to available evidence>
Limitations:    <coverage, sampling, baseline, symbolization or access gaps>
Next action:    <smallest missing evidence or handoff question | none>

Συνοδευτικά αρχεία

Το μοντέλο τα διαβάζει όποτε χρειάζεται, όσο η δεξιότητα είναι φορτωμένη. Διατίθενται ως αρχεία για ανάγνωση και δεν εκτελούνται ποτέ.

Συχνές ερωτήσεις

Τι κάνει η δεξιότητα AI Performance Rca;

Investigates CPU, memory, and contention problems with Grafana Pyroscope profiles via the gcx CLI. Compares affected and baseline workloads, locates changed application stacks, and tests root-cause hypotheses against symptom and change evidence. Use when a service shows high CPU, growing memory, GC pressure, lock contention, or hot functions, when code regressed after a deploy, or when given a suspect service, flame graph, trace, or profiling anomaly report. For profiling setup use pyroscope; for profilecli-based analysis use profilecli-insights.

Γιατί να χρησιμοποιήσετε τη δεξιότητα Performance Rca στο TypingMind;

Επειδή την εγκαθιστάτε μία φορά και τη χρησιμοποιείτε με οποιοδήποτε μοντέλο. Η Performance Rca είναι απλό Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως η ίδια δεξιότητα λειτουργεί με GPT-5, Claude, Gemini, Grok ή ένα τοπικό μοντέλο — και μπορείτε να αλλάξετε μοντέλο κατά τη διάρκεια της συνομιλίας χωρίς να διακοπεί η λειτουργία της. Το TypingMind λειτουργεί με τα δικά σας κλειδιά API, οπότε πληρώνετε απευθείας τους παρόχους αντί για συνδρομή ανά θέση χρήστη, ενώ οι δεξιότητες και οι συνομιλίες σας παραμένουν στον δικό σας χώρο αποθήκευσης.

Πώς εγκαθιστώ τη Performance Rca στο TypingMind;

Στο TypingMind, ανοίξτε Πρόσθετα → Δεξιότητες → Εγκατάσταση από το GitHub και επικολλήστε το https://github.com/grafana/skills/tree/main/skills/grafana-lgtm/performance-rca. Το TypingMind διαβάζει το αρχείο SKILL.md, συγκεντρώνει τα συνοδευτικά αρχεία και εγκαθιστά τη δεξιότητα, την οποία μπορείτε να ενεργοποιείτε ανά συνομιλία.

Ποια μοντέλα AI μπορούν να χρησιμοποιήσουν τη δεξιότητα Performance Rca;

Οποιοδήποτε μοντέλο συνδέετε στο TypingMind. Οι δεξιότητες AI είναι απλές οδηγίες Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως τα GPT, Claude, Gemini, Grok και τα τοπικά μοντέλα μπορούν όλα να φορτώσουν αυτή τη δεξιότητα όταν ένα αίτημα αντιστοιχεί σε αυτή.

Με πόσα μοντέλα AI μπορώ να χρησιμοποιήσω τη Performance Rca;

Με όσα θέλετε. Εφόσον ένα μοντέλο υποστηρίζει δεξιότητες, μπορείτε να χρησιμοποιήσετε τη Performance Rca με αυτό — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama και άλλα — όλα στο TypingMind με τα δικά σας κλειδιά API.

Είναι δωρεάν η δεξιότητα AI Performance Rca;

Ναι. Δημοσιεύεται στο GitHub από τον χρήστη grafana με την άδεια χρήσης Apache-2.0. Πληρώνετε μόνο τον δικό σας πάροχο AI για τα token που χρησιμοποιείτε.

Τι είναι οι δεξιότητες AI;

Μια δεξιότητα AI είναι ένα επαναχρησιμοποιήσιμο πακέτο οδηγιών που διδάσκει σε ένα μοντέλο AI πώς να εκτελεί μια συγκεκριμένη εργασία. Ακολουθεί την ανοιχτή μορφή Agent Skills: ένα αρχείο SKILL.md με όνομα και περιγραφή, μαζί με τυχόν σενάρια κώδικα, πρότυπα ή αρχεία αναφοράς που μπορεί να χρειαστεί το μοντέλο. Το μοντέλο διαβάζει τις οδηγίες μόνο όταν το αίτημά σας αντιστοιχεί στη δεξιότητα, οπότε μια εγκατεστημένη δεξιότητα δεν κοστίζει τίποτα μέχρι να χρησιμοποιηθεί.

Σε τι διαφέρουν οι δεξιότητες AI από τα πρόσθετα ή τους συνδέσμους MCP;

Ένα πρόσθετο ή ένας σύνδεσμος MCP παρέχει στο μοντέλο νέα εργαλεία που μπορεί να καλέσει — κώδικα που εκτελείται κάπου και επιστρέφει ένα αποτέλεσμα. Μια δεξιότητα AI παρέχει αντί γι’ αυτό γνώσεις και διαδικασίες στο μοντέλο: πώς να προσεγγίσει μια εργασία, ποια βήματα να ακολουθήσει και ποια χαρακτηριστικά έχει ένα καλό αποτέλεσμα. Οι δεξιότητες είναι απλό Markdown, επομένως δεν χρειάζονται διακομιστή, κλειδί API ή περιβάλλον εκτέλεσης και λειτουργούν με οποιοδήποτε μοντέλο.

Προβολή όλων

Στήστε δικό σας χώρο εργασίας AI τώρα

Εγγραφείτε στο ενημερωτικό μας δελτίο για να ενημερώνεστε για νέες λειτουργίες και μελλοντικές κληρώσεις δώρων 👇