[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-grafana-profilecli-insights":3,"mdc--n8gn02-key":34,"related-org-grafana-profilecli-insights":1429,"related-repo-grafana-profilecli-insights":1619},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":29,"sourceUrl":32,"mdContent":33},"profilecli-insights","analyze CPU and memory profiling data","Query a remote Pyroscope server to analyze CPU and memory profiling data and correlate hot functions with source code in this repository. Use when the user asks about performance, profiling, slow code, CPU usage, memory allocations, or hot functions.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"grafana","Grafana","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fgrafana.jpg",[12,16,19,20],{"name":13,"slug":14,"type":15},"Observability","observability","tag",{"name":17,"slug":18,"type":15},"Performance","performance",{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},"Debugging","debugging",8,"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fpyroscope-skills","2026-07-12T07:45:02.369321",null,0,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":31},[],"Claude Code plugin providing profilecli-powered performance analysis skills for Pyroscope profiling data","https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fpyroscope-skills\u002Ftree\u002FHEAD\u002Fplugins\u002Fprofilecli-plugin\u002Fskills\u002Fprofilecli-insights","---\nname: profilecli-insights\ndescription: >\n  Query a remote Pyroscope server to analyze CPU and memory profiling data\n  and correlate hot functions with source code in this repository.\n  Use when the user asks about performance, profiling, slow code, CPU usage,\n  memory allocations, or hot functions.\nallowed-tools: Bash(profilecli *), Bash(pprof *), Bash(go tool pprof *), Bash(go run github.com\u002Fgoogle\u002Fpprof*), Read, Grep, Glob\nargument-hint: \u003Cquestion about performance, e.g. \"Why is the ingester slow?\">\n---\n\n# Profile Insights\n\nYou are a performance analysis assistant. You query a remote Pyroscope continuous profiling server using the `profilecli` CLI tool, then correlate the results with source code in this repository to provide actionable insights.\n\nFollow these steps in order. Do not skip steps.\n\n## Step 1: Ensure profilecli is available\n\n- Check if `profilecli` exists in the PATH.\n\n```bash\nprofilecli --version\n```\n\nIf the binary is NOT found, instruct the user to download it from GitHub releases: \"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fpyroscope\u002Freleases\u002Flatest\u002Fdownload\u002F\"\n\n- Check if `pprof` exists in the PATH. If not fallback to `go tool pprof`, for all future command calls for `pprof`.\n\n## Step 2: Verify connectivity and data exists\n\nRun the series query to validate the connection and discover available profile types:\n\n```bash\nprofilecli query series --label-names=__profile_type__\n```\n\nIf this succeeds, parse the JSON output and remember the available `__profile_type__` values. Common types include:\n- `process_cpu:cpu:nanoseconds:cpu:nanoseconds` (CPU)\n- `memory:alloc_space:bytes:space:bytes` (memory allocations)\n- `memory:inuse_space:bytes:space:bytes` (memory in-use)\n- `goroutine:goroutines:count:goroutine:count` (goroutines)\n- `mutex:contentions:count:contentions:count` (mutex contention)\n- `block:contentions:count:contentions:count` (block contention)\n\nYou will need these profile types in Step 4.\n\nIf this fails, help the user set up the connection:\n\nOption a) Run a local pyroscope available on port :4040\n\nOption b) Connect to a remote Grafana using service account tokens\n\n- `PROFILECLI_URL` **(required)**: The Pyroscope server URL (e.g. `http:\u002F\u002Flocalhost:4040`) or if used with `PROFILECLI_TOKEN` a data source proxy URL: https:\u002F\u002Fmy-grafana.corp.com\u002Fapi\u002Fdatasources\u002Fproxy\u002Fuid\u002F\u003Cdatasource-uid>.\n- `PROFILECLI_TOKEN` **(required for Grafana Cloud)**: A Grafana service account token (format: `glsa_...`). Create one at **Grafana > Administration > Service Accounts > Add token** with the `Viewer` role.\n\n\nThen **stop and wait** for the user to configure their environment. And the initial profilecli query command to succeed.\n\n## Step 3: Discover services\n\nList available services and find correlation with the current checked out repo:\n\n```bash\nprofilecli query series --query '{}' --label-names service_repository --label-names service_name\n```\n\nParse the JSON output to extract `service_name` and `service_repository` values. To correlate with the current repo, compare the `service_repository` values against the git remote URL (run `git remote get-url origin` if needed). Services whose `service_repository` matches the current repo are the most relevant.\n\nMatch the user's question to one or more service names. If the user's question doesn't clearly map to a service:\n\n- Show the list of available services (highlight any that match the current repository).\n- Ask the user which service to analyze.\n\n## Step 4: Query for the relevant profile type\n\nQuery the profile for the target service. Use the appropriate profile type discovered in Step 2 (often `process_cpu:cpu:nanoseconds:cpu:nanoseconds`). The query argument needs to be a valid PromQL label selector.\n\n```bash\nprofilecli query merge \\\n  --query '\u003CQUERY>' \\\n  --profile-type \u003CPROFILE_TYPE> \\\n  --from now-1h --to now \\\n  --output pprof=\u002Ftmp\u002F\u003Ctemporary-unique-file-name>.pb.gz -f\n```\n\nIf the output file is empty, try broadening the time range to `--from now-6h` or `--from now-24h`.\n\nNow you can analyze the profile using pprof.\n```bash\npprof -lines -top -cum \u002Ftmp\u002F\u003Ctemporary-unique-file-name>.pb.gz\n```\n\n\n## Step 5: Identify hot functions\n\nParse the pprof console output to extract the top functions ranked by sample count (flat and cumulative). Focus on:\n\n- Functions with the highest flat time (self time).\n- Functions with the highest cumulative time (including callees).\n- Notable standard library or runtime functions (e.g., `runtime.mallocgc` indicates allocation pressure, `runtime.futex` indicates lock contention).\n\n## Step 6: Map hot functions to source code\n\nThe pprof `-lines -top -cum` output format shows each function as:\n\n```\n\u003Cflat> \u003Cflat%> \u003Csum%> \u003Ccum> \u003Ccum%>  \u003Cfunction-name> \u003Csource-file>:\u003Cline>\n```\n\nFor example:\n```\n1859.03s 23.50%  ...  github.com\u002Fgrafana\u002Fpyroscope\u002Fpkg\u002Fdistributor.(*Distributor).PushBatch.func1 github.com\u002Fgrafana\u002Fpyroscope\u002Fpkg\u002Fdistributor\u002Fdistributor.go:380\n```\n\nThe **source file path** after the function name is the key for mapping. For files belonging to this repository:\n\n1. **Identify in-repo files**: File paths starting with `github.com\u002Fgrafana\u002Fpyroscope\u002F` (without an `@version` suffix) belong to this repo. Third-party dependencies have `@v...` in the path (e.g. `github.com\u002Fgrafana\u002Fdskit@v0.0.0-...\u002Fmiddleware\u002Finstrument.go`).\n\n2. **Strip the module prefix** `github.com\u002Fgrafana\u002Fpyroscope\u002F` to get the relative file path. For example:\n   - `github.com\u002Fgrafana\u002Fpyroscope\u002Fpkg\u002Fdistributor\u002Fdistributor.go:380` -> `pkg\u002Fdistributor\u002Fdistributor.go` line 380\n   - `github.com\u002Fgrafana\u002Fpyroscope\u002Fpkg\u002Fpprof\u002Ffix_go_profile.go:59` -> `pkg\u002Fpprof\u002Ffix_go_profile.go` line 59\n\n3. **Check the git ref (if available)**: The pprof Build ID line may contain JSON with a `git_ref` field (e.g. `\"git_ref\":\"327c1448a\"`). If present, compare it against the current HEAD with `git log --oneline -1`. If they differ, warn the user that line numbers may not match exactly because the profile was built from a different commit. Use `git log --oneline \u003Cgit_ref>..HEAD -- \u003Cfile>` to check if the specific files have changed. If the Build ID is empty or doesn't contain a `git_ref`, skip this check and note that you cannot verify whether the source matches the profiled binary.\n\n4. **Read the source** directly using the relative file path and line number from the pprof output. Read a window around the reported line (e.g. 20 lines before and after) for context.\n\n5. **For the function name**, extract the method\u002Ffunction from the fully-qualified name:\n   - `pkg\u002Fdistributor.(*Distributor).PushBatch.func1` -> method `PushBatch` on `*Distributor`, closure `.func1`\n   - `pkg\u002Fpprof.DropGoTypeParameters` -> function `DropGoTypeParameters` in package `pprof`\n\nFor third-party or standard library functions, note them in the analysis if they are significant:\n- `runtime.mallocgc` = excessive allocations\n- `runtime.chanrecv` \u002F `runtime.chansend` = channel blocking\n- `runtime.futex` \u002F `runtime.lock` = lock contention\n- `runtime.gcBgMarkWorker` \u002F `runtime.gcDrain` = GC pressure\n- `compress\u002Fgzip` or `compress\u002Fflate` = compression overhead\n\n## Step 7: Deliver analysis\n\nPresent a structured report:\n\n### Summary\nA 2-3 sentence overview of the performance profile.\n\n### Top Hot Functions\nA ranked table of the most significant functions with:\n- Function name\n- Flat \u002F cumulative sample percentages\n- Source file and line number (for repo functions)\n- Brief description of what the function does\n\n### Source Code Analysis\nFor each hot function in this repository:\n- Show the relevant code snippet\n- Explain why it might be hot\n- Suggest specific optimizations if applicable (e.g., reduce allocations, cache results, use sync.Pool, reduce lock contention)\n\n### Recommendations\nPrioritized list of actionable optimization suggestions, ordered by expected impact.\n\n## Error Handling\n\n- **profilecli not found and download fails**: Tell the user to manually download from https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fpyroscope\u002Freleases\u002Flatest\n- **Connection errors**: Suggest checking `PROFILECLI_URL` value and network connectivity\n- **Authentication errors (401\u002F403)**: Suggest checking `PROFILECLI_TOKEN` and `PROFILECLI_TENANT_ID`\n- **Empty results**: Try broader time ranges (`now-6h`, `now-24h`), verify the service name via `query series`\n- **Service not found**: List available services from Step 4 and ask the user to pick one\n",{"data":35,"body":38},{"name":4,"description":6,"allowed-tools":36,"argument-hint":37},"Bash(profilecli *), Bash(pprof *), Bash(go tool pprof *), Bash(go run github.com\u002Fgoogle\u002Fpprof*), Read, Grep, Glob","\u003Cquestion about performance, e.g. \"Why is the ingester slow?\">",{"type":39,"children":40},"root",[41,50,65,70,77,94,122,137,167,173,178,207,220,289,294,299,304,309,397,409,415,420,482,525,530,543,549,561,720,740,745,800,806,811,845,851,864,874,879,888,900,1131,1136,1221,1227,1232,1239,1244,1250,1255,1278,1284,1289,1307,1313,1318,1324,1423],{"type":42,"tag":43,"props":44,"children":46},"element","h1",{"id":45},"profile-insights",[47],{"type":48,"value":49},"text","Profile Insights",{"type":42,"tag":51,"props":52,"children":53},"p",{},[54,56,63],{"type":48,"value":55},"You are a performance analysis assistant. You query a remote Pyroscope continuous profiling server using the ",{"type":42,"tag":57,"props":58,"children":60},"code",{"className":59},[],[61],{"type":48,"value":62},"profilecli",{"type":48,"value":64}," CLI tool, then correlate the results with source code in this repository to provide actionable insights.",{"type":42,"tag":51,"props":66,"children":67},{},[68],{"type":48,"value":69},"Follow these steps in order. Do not skip steps.",{"type":42,"tag":71,"props":72,"children":74},"h2",{"id":73},"step-1-ensure-profilecli-is-available",[75],{"type":48,"value":76},"Step 1: Ensure profilecli is available",{"type":42,"tag":78,"props":79,"children":80},"ul",{},[81],{"type":42,"tag":82,"props":83,"children":84},"li",{},[85,87,92],{"type":48,"value":86},"Check if ",{"type":42,"tag":57,"props":88,"children":90},{"className":89},[],[91],{"type":48,"value":62},{"type":48,"value":93}," exists in the PATH.",{"type":42,"tag":95,"props":96,"children":101},"pre",{"className":97,"code":98,"language":99,"meta":100,"style":100},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","profilecli --version\n","bash","",[102],{"type":42,"tag":57,"props":103,"children":104},{"__ignoreMap":100},[105],{"type":42,"tag":106,"props":107,"children":110},"span",{"class":108,"line":109},"line",1,[111,116],{"type":42,"tag":106,"props":112,"children":114},{"style":113},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[115],{"type":48,"value":62},{"type":42,"tag":106,"props":117,"children":119},{"style":118},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[120],{"type":48,"value":121}," --version\n",{"type":42,"tag":51,"props":123,"children":124},{},[125,127,135],{"type":48,"value":126},"If the binary is NOT found, instruct the user to download it from GitHub releases: \"",{"type":42,"tag":128,"props":129,"children":133},"a",{"href":130,"rel":131},"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fpyroscope\u002Freleases\u002Flatest\u002Fdownload\u002F",[132],"nofollow",[134],{"type":48,"value":130},{"type":48,"value":136},"\"",{"type":42,"tag":78,"props":138,"children":139},{},[140],{"type":42,"tag":82,"props":141,"children":142},{},[143,144,150,152,158,160,165],{"type":48,"value":86},{"type":42,"tag":57,"props":145,"children":147},{"className":146},[],[148],{"type":48,"value":149},"pprof",{"type":48,"value":151}," exists in the PATH. If not fallback to ",{"type":42,"tag":57,"props":153,"children":155},{"className":154},[],[156],{"type":48,"value":157},"go tool pprof",{"type":48,"value":159},", for all future command calls for ",{"type":42,"tag":57,"props":161,"children":163},{"className":162},[],[164],{"type":48,"value":149},{"type":48,"value":166},".",{"type":42,"tag":71,"props":168,"children":170},{"id":169},"step-2-verify-connectivity-and-data-exists",[171],{"type":48,"value":172},"Step 2: Verify connectivity and data exists",{"type":42,"tag":51,"props":174,"children":175},{},[176],{"type":48,"value":177},"Run the series query to validate the connection and discover available profile types:",{"type":42,"tag":95,"props":179,"children":181},{"className":97,"code":180,"language":99,"meta":100,"style":100},"profilecli query series --label-names=__profile_type__\n",[182],{"type":42,"tag":57,"props":183,"children":184},{"__ignoreMap":100},[185],{"type":42,"tag":106,"props":186,"children":187},{"class":108,"line":109},[188,192,197,202],{"type":42,"tag":106,"props":189,"children":190},{"style":113},[191],{"type":48,"value":62},{"type":42,"tag":106,"props":193,"children":194},{"style":118},[195],{"type":48,"value":196}," query",{"type":42,"tag":106,"props":198,"children":199},{"style":118},[200],{"type":48,"value":201}," series",{"type":42,"tag":106,"props":203,"children":204},{"style":118},[205],{"type":48,"value":206}," --label-names=__profile_type__\n",{"type":42,"tag":51,"props":208,"children":209},{},[210,212,218],{"type":48,"value":211},"If this succeeds, parse the JSON output and remember the available ",{"type":42,"tag":57,"props":213,"children":215},{"className":214},[],[216],{"type":48,"value":217},"__profile_type__",{"type":48,"value":219}," values. Common types include:",{"type":42,"tag":78,"props":221,"children":222},{},[223,234,245,256,267,278],{"type":42,"tag":82,"props":224,"children":225},{},[226,232],{"type":42,"tag":57,"props":227,"children":229},{"className":228},[],[230],{"type":48,"value":231},"process_cpu:cpu:nanoseconds:cpu:nanoseconds",{"type":48,"value":233}," (CPU)",{"type":42,"tag":82,"props":235,"children":236},{},[237,243],{"type":42,"tag":57,"props":238,"children":240},{"className":239},[],[241],{"type":48,"value":242},"memory:alloc_space:bytes:space:bytes",{"type":48,"value":244}," (memory allocations)",{"type":42,"tag":82,"props":246,"children":247},{},[248,254],{"type":42,"tag":57,"props":249,"children":251},{"className":250},[],[252],{"type":48,"value":253},"memory:inuse_space:bytes:space:bytes",{"type":48,"value":255}," (memory in-use)",{"type":42,"tag":82,"props":257,"children":258},{},[259,265],{"type":42,"tag":57,"props":260,"children":262},{"className":261},[],[263],{"type":48,"value":264},"goroutine:goroutines:count:goroutine:count",{"type":48,"value":266}," (goroutines)",{"type":42,"tag":82,"props":268,"children":269},{},[270,276],{"type":42,"tag":57,"props":271,"children":273},{"className":272},[],[274],{"type":48,"value":275},"mutex:contentions:count:contentions:count",{"type":48,"value":277}," (mutex contention)",{"type":42,"tag":82,"props":279,"children":280},{},[281,287],{"type":42,"tag":57,"props":282,"children":284},{"className":283},[],[285],{"type":48,"value":286},"block:contentions:count:contentions:count",{"type":48,"value":288}," (block contention)",{"type":42,"tag":51,"props":290,"children":291},{},[292],{"type":48,"value":293},"You will need these profile types in Step 4.",{"type":42,"tag":51,"props":295,"children":296},{},[297],{"type":48,"value":298},"If this fails, help the user set up the connection:",{"type":42,"tag":51,"props":300,"children":301},{},[302],{"type":48,"value":303},"Option a) Run a local pyroscope available on port :4040",{"type":42,"tag":51,"props":305,"children":306},{},[307],{"type":48,"value":308},"Option b) Connect to a remote Grafana using service account tokens",{"type":42,"tag":78,"props":310,"children":311},{},[312,358],{"type":42,"tag":82,"props":313,"children":314},{},[315,321,323,329,331,337,339,345,347,353],{"type":42,"tag":57,"props":316,"children":318},{"className":317},[],[319],{"type":48,"value":320},"PROFILECLI_URL",{"type":48,"value":322}," ",{"type":42,"tag":324,"props":325,"children":326},"strong",{},[327],{"type":48,"value":328},"(required)",{"type":48,"value":330},": The Pyroscope server URL (e.g. ",{"type":42,"tag":57,"props":332,"children":334},{"className":333},[],[335],{"type":48,"value":336},"http:\u002F\u002Flocalhost:4040",{"type":48,"value":338},") or if used with ",{"type":42,"tag":57,"props":340,"children":342},{"className":341},[],[343],{"type":48,"value":344},"PROFILECLI_TOKEN",{"type":48,"value":346}," a data source proxy URL: ",{"type":42,"tag":128,"props":348,"children":351},{"href":349,"rel":350},"https:\u002F\u002Fmy-grafana.corp.com\u002Fapi\u002Fdatasources\u002Fproxy\u002Fuid\u002F",[132],[352],{"type":48,"value":349},{"type":42,"tag":354,"props":355,"children":356},"datasource-uid",{},[357],{"type":48,"value":166},{"type":42,"tag":82,"props":359,"children":360},{},[361,366,367,372,374,380,382,387,389,395],{"type":42,"tag":57,"props":362,"children":364},{"className":363},[],[365],{"type":48,"value":344},{"type":48,"value":322},{"type":42,"tag":324,"props":368,"children":369},{},[370],{"type":48,"value":371},"(required for Grafana Cloud)",{"type":48,"value":373},": A Grafana service account token (format: ",{"type":42,"tag":57,"props":375,"children":377},{"className":376},[],[378],{"type":48,"value":379},"glsa_...",{"type":48,"value":381},"). Create one at ",{"type":42,"tag":324,"props":383,"children":384},{},[385],{"type":48,"value":386},"Grafana > Administration > Service Accounts > Add token",{"type":48,"value":388}," with the ",{"type":42,"tag":57,"props":390,"children":392},{"className":391},[],[393],{"type":48,"value":394},"Viewer",{"type":48,"value":396}," role.",{"type":42,"tag":51,"props":398,"children":399},{},[400,402,407],{"type":48,"value":401},"Then ",{"type":42,"tag":324,"props":403,"children":404},{},[405],{"type":48,"value":406},"stop and wait",{"type":48,"value":408}," for the user to configure their environment. And the initial profilecli query command to succeed.",{"type":42,"tag":71,"props":410,"children":412},{"id":411},"step-3-discover-services",[413],{"type":48,"value":414},"Step 3: Discover services",{"type":42,"tag":51,"props":416,"children":417},{},[418],{"type":48,"value":419},"List available services and find correlation with the current checked out repo:",{"type":42,"tag":95,"props":421,"children":423},{"className":97,"code":422,"language":99,"meta":100,"style":100},"profilecli query series --query '{}' --label-names service_repository --label-names service_name\n",[424],{"type":42,"tag":57,"props":425,"children":426},{"__ignoreMap":100},[427],{"type":42,"tag":106,"props":428,"children":429},{"class":108,"line":109},[430,434,438,442,447,453,458,463,468,473,477],{"type":42,"tag":106,"props":431,"children":432},{"style":113},[433],{"type":48,"value":62},{"type":42,"tag":106,"props":435,"children":436},{"style":118},[437],{"type":48,"value":196},{"type":42,"tag":106,"props":439,"children":440},{"style":118},[441],{"type":48,"value":201},{"type":42,"tag":106,"props":443,"children":444},{"style":118},[445],{"type":48,"value":446}," --query",{"type":42,"tag":106,"props":448,"children":450},{"style":449},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[451],{"type":48,"value":452}," '",{"type":42,"tag":106,"props":454,"children":455},{"style":118},[456],{"type":48,"value":457},"{}",{"type":42,"tag":106,"props":459,"children":460},{"style":449},[461],{"type":48,"value":462},"'",{"type":42,"tag":106,"props":464,"children":465},{"style":118},[466],{"type":48,"value":467}," --label-names",{"type":42,"tag":106,"props":469,"children":470},{"style":118},[471],{"type":48,"value":472}," service_repository",{"type":42,"tag":106,"props":474,"children":475},{"style":118},[476],{"type":48,"value":467},{"type":42,"tag":106,"props":478,"children":479},{"style":118},[480],{"type":48,"value":481}," service_name\n",{"type":42,"tag":51,"props":483,"children":484},{},[485,487,493,495,501,503,508,510,516,518,523],{"type":48,"value":486},"Parse the JSON output to extract ",{"type":42,"tag":57,"props":488,"children":490},{"className":489},[],[491],{"type":48,"value":492},"service_name",{"type":48,"value":494}," and ",{"type":42,"tag":57,"props":496,"children":498},{"className":497},[],[499],{"type":48,"value":500},"service_repository",{"type":48,"value":502}," values. To correlate with the current repo, compare the ",{"type":42,"tag":57,"props":504,"children":506},{"className":505},[],[507],{"type":48,"value":500},{"type":48,"value":509}," values against the git remote URL (run ",{"type":42,"tag":57,"props":511,"children":513},{"className":512},[],[514],{"type":48,"value":515},"git remote get-url origin",{"type":48,"value":517}," if needed). Services whose ",{"type":42,"tag":57,"props":519,"children":521},{"className":520},[],[522],{"type":48,"value":500},{"type":48,"value":524}," matches the current repo are the most relevant.",{"type":42,"tag":51,"props":526,"children":527},{},[528],{"type":48,"value":529},"Match the user's question to one or more service names. If the user's question doesn't clearly map to a service:",{"type":42,"tag":78,"props":531,"children":532},{},[533,538],{"type":42,"tag":82,"props":534,"children":535},{},[536],{"type":48,"value":537},"Show the list of available services (highlight any that match the current repository).",{"type":42,"tag":82,"props":539,"children":540},{},[541],{"type":48,"value":542},"Ask the user which service to analyze.",{"type":42,"tag":71,"props":544,"children":546},{"id":545},"step-4-query-for-the-relevant-profile-type",[547],{"type":48,"value":548},"Step 4: Query for the relevant profile type",{"type":42,"tag":51,"props":550,"children":551},{},[552,554,559],{"type":48,"value":553},"Query the profile for the target service. Use the appropriate profile type discovered in Step 2 (often ",{"type":42,"tag":57,"props":555,"children":557},{"className":556},[],[558],{"type":48,"value":231},{"type":48,"value":560},"). The query argument needs to be a valid PromQL label selector.",{"type":42,"tag":95,"props":562,"children":564},{"className":97,"code":563,"language":99,"meta":100,"style":100},"profilecli query merge \\\n  --query '\u003CQUERY>' \\\n  --profile-type \u003CPROFILE_TYPE> \\\n  --from now-1h --to now \\\n  --output pprof=\u002Ftmp\u002F\u003Ctemporary-unique-file-name>.pb.gz -f\n",[565],{"type":42,"tag":57,"props":566,"children":567},{"__ignoreMap":100},[568,590,616,649,677],{"type":42,"tag":106,"props":569,"children":570},{"class":108,"line":109},[571,575,579,584],{"type":42,"tag":106,"props":572,"children":573},{"style":113},[574],{"type":48,"value":62},{"type":42,"tag":106,"props":576,"children":577},{"style":118},[578],{"type":48,"value":196},{"type":42,"tag":106,"props":580,"children":581},{"style":118},[582],{"type":48,"value":583}," merge",{"type":42,"tag":106,"props":585,"children":587},{"style":586},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[588],{"type":48,"value":589}," \\\n",{"type":42,"tag":106,"props":591,"children":593},{"class":108,"line":592},2,[594,599,603,608,612],{"type":42,"tag":106,"props":595,"children":596},{"style":118},[597],{"type":48,"value":598},"  --query",{"type":42,"tag":106,"props":600,"children":601},{"style":449},[602],{"type":48,"value":452},{"type":42,"tag":106,"props":604,"children":605},{"style":118},[606],{"type":48,"value":607},"\u003CQUERY>",{"type":42,"tag":106,"props":609,"children":610},{"style":449},[611],{"type":48,"value":462},{"type":42,"tag":106,"props":613,"children":614},{"style":586},[615],{"type":48,"value":589},{"type":42,"tag":106,"props":617,"children":619},{"class":108,"line":618},3,[620,625,630,635,640,645],{"type":42,"tag":106,"props":621,"children":622},{"style":118},[623],{"type":48,"value":624},"  --profile-type",{"type":42,"tag":106,"props":626,"children":627},{"style":449},[628],{"type":48,"value":629}," \u003C",{"type":42,"tag":106,"props":631,"children":632},{"style":118},[633],{"type":48,"value":634},"PROFILE_TYP",{"type":42,"tag":106,"props":636,"children":637},{"style":586},[638],{"type":48,"value":639},"E",{"type":42,"tag":106,"props":641,"children":642},{"style":449},[643],{"type":48,"value":644},">",{"type":42,"tag":106,"props":646,"children":647},{"style":586},[648],{"type":48,"value":589},{"type":42,"tag":106,"props":650,"children":652},{"class":108,"line":651},4,[653,658,663,668,673],{"type":42,"tag":106,"props":654,"children":655},{"style":118},[656],{"type":48,"value":657},"  --from",{"type":42,"tag":106,"props":659,"children":660},{"style":118},[661],{"type":48,"value":662}," now-1h",{"type":42,"tag":106,"props":664,"children":665},{"style":118},[666],{"type":48,"value":667}," --to",{"type":42,"tag":106,"props":669,"children":670},{"style":118},[671],{"type":48,"value":672}," now",{"type":42,"tag":106,"props":674,"children":675},{"style":586},[676],{"type":48,"value":589},{"type":42,"tag":106,"props":678,"children":680},{"class":108,"line":679},5,[681,686,691,696,701,706,710,715],{"type":42,"tag":106,"props":682,"children":683},{"style":118},[684],{"type":48,"value":685},"  --output",{"type":42,"tag":106,"props":687,"children":688},{"style":118},[689],{"type":48,"value":690}," pprof=\u002Ftmp\u002F",{"type":42,"tag":106,"props":692,"children":693},{"style":449},[694],{"type":48,"value":695},"\u003C",{"type":42,"tag":106,"props":697,"children":698},{"style":118},[699],{"type":48,"value":700},"temporary-unique-file-nam",{"type":42,"tag":106,"props":702,"children":703},{"style":586},[704],{"type":48,"value":705},"e",{"type":42,"tag":106,"props":707,"children":708},{"style":449},[709],{"type":48,"value":644},{"type":42,"tag":106,"props":711,"children":712},{"style":118},[713],{"type":48,"value":714},".pb.gz",{"type":42,"tag":106,"props":716,"children":717},{"style":118},[718],{"type":48,"value":719}," -f\n",{"type":42,"tag":51,"props":721,"children":722},{},[723,725,731,733,739],{"type":48,"value":724},"If the output file is empty, try broadening the time range to ",{"type":42,"tag":57,"props":726,"children":728},{"className":727},[],[729],{"type":48,"value":730},"--from now-6h",{"type":48,"value":732}," or ",{"type":42,"tag":57,"props":734,"children":736},{"className":735},[],[737],{"type":48,"value":738},"--from now-24h",{"type":48,"value":166},{"type":42,"tag":51,"props":741,"children":742},{},[743],{"type":48,"value":744},"Now you can analyze the profile using pprof.",{"type":42,"tag":95,"props":746,"children":748},{"className":97,"code":747,"language":99,"meta":100,"style":100},"pprof -lines -top -cum \u002Ftmp\u002F\u003Ctemporary-unique-file-name>.pb.gz\n",[749],{"type":42,"tag":57,"props":750,"children":751},{"__ignoreMap":100},[752],{"type":42,"tag":106,"props":753,"children":754},{"class":108,"line":109},[755,759,764,769,774,779,783,787,791,795],{"type":42,"tag":106,"props":756,"children":757},{"style":113},[758],{"type":48,"value":149},{"type":42,"tag":106,"props":760,"children":761},{"style":118},[762],{"type":48,"value":763}," -lines",{"type":42,"tag":106,"props":765,"children":766},{"style":118},[767],{"type":48,"value":768}," -top",{"type":42,"tag":106,"props":770,"children":771},{"style":118},[772],{"type":48,"value":773}," -cum",{"type":42,"tag":106,"props":775,"children":776},{"style":118},[777],{"type":48,"value":778}," \u002Ftmp\u002F",{"type":42,"tag":106,"props":780,"children":781},{"style":449},[782],{"type":48,"value":695},{"type":42,"tag":106,"props":784,"children":785},{"style":118},[786],{"type":48,"value":700},{"type":42,"tag":106,"props":788,"children":789},{"style":586},[790],{"type":48,"value":705},{"type":42,"tag":106,"props":792,"children":793},{"style":449},[794],{"type":48,"value":644},{"type":42,"tag":106,"props":796,"children":797},{"style":118},[798],{"type":48,"value":799},".pb.gz\n",{"type":42,"tag":71,"props":801,"children":803},{"id":802},"step-5-identify-hot-functions",[804],{"type":48,"value":805},"Step 5: Identify hot functions",{"type":42,"tag":51,"props":807,"children":808},{},[809],{"type":48,"value":810},"Parse the pprof console output to extract the top functions ranked by sample count (flat and cumulative). Focus on:",{"type":42,"tag":78,"props":812,"children":813},{},[814,819,824],{"type":42,"tag":82,"props":815,"children":816},{},[817],{"type":48,"value":818},"Functions with the highest flat time (self time).",{"type":42,"tag":82,"props":820,"children":821},{},[822],{"type":48,"value":823},"Functions with the highest cumulative time (including callees).",{"type":42,"tag":82,"props":825,"children":826},{},[827,829,835,837,843],{"type":48,"value":828},"Notable standard library or runtime functions (e.g., ",{"type":42,"tag":57,"props":830,"children":832},{"className":831},[],[833],{"type":48,"value":834},"runtime.mallocgc",{"type":48,"value":836}," indicates allocation pressure, ",{"type":42,"tag":57,"props":838,"children":840},{"className":839},[],[841],{"type":48,"value":842},"runtime.futex",{"type":48,"value":844}," indicates lock contention).",{"type":42,"tag":71,"props":846,"children":848},{"id":847},"step-6-map-hot-functions-to-source-code",[849],{"type":48,"value":850},"Step 6: Map hot functions to source code",{"type":42,"tag":51,"props":852,"children":853},{},[854,856,862],{"type":48,"value":855},"The pprof ",{"type":42,"tag":57,"props":857,"children":859},{"className":858},[],[860],{"type":48,"value":861},"-lines -top -cum",{"type":48,"value":863}," output format shows each function as:",{"type":42,"tag":95,"props":865,"children":869},{"className":866,"code":868,"language":48},[867],"language-text","\u003Cflat> \u003Cflat%> \u003Csum%> \u003Ccum> \u003Ccum%>  \u003Cfunction-name> \u003Csource-file>:\u003Cline>\n",[870],{"type":42,"tag":57,"props":871,"children":872},{"__ignoreMap":100},[873],{"type":48,"value":868},{"type":42,"tag":51,"props":875,"children":876},{},[877],{"type":48,"value":878},"For example:",{"type":42,"tag":95,"props":880,"children":883},{"className":881,"code":882,"language":48},[867],"1859.03s 23.50%  ...  github.com\u002Fgrafana\u002Fpyroscope\u002Fpkg\u002Fdistributor.(*Distributor).PushBatch.func1 github.com\u002Fgrafana\u002Fpyroscope\u002Fpkg\u002Fdistributor\u002Fdistributor.go:380\n",[884],{"type":42,"tag":57,"props":885,"children":886},{"__ignoreMap":100},[887],{"type":48,"value":882},{"type":42,"tag":51,"props":889,"children":890},{},[891,893,898],{"type":48,"value":892},"The ",{"type":42,"tag":324,"props":894,"children":895},{},[896],{"type":48,"value":897},"source file path",{"type":48,"value":899}," after the function name is the key for mapping. For files belonging to this repository:",{"type":42,"tag":901,"props":902,"children":903},"ol",{},[904,946,1002,1051,1061],{"type":42,"tag":82,"props":905,"children":906},{},[907,912,914,920,922,928,930,936,938,944],{"type":42,"tag":324,"props":908,"children":909},{},[910],{"type":48,"value":911},"Identify in-repo files",{"type":48,"value":913},": File paths starting with ",{"type":42,"tag":57,"props":915,"children":917},{"className":916},[],[918],{"type":48,"value":919},"github.com\u002Fgrafana\u002Fpyroscope\u002F",{"type":48,"value":921}," (without an ",{"type":42,"tag":57,"props":923,"children":925},{"className":924},[],[926],{"type":48,"value":927},"@version",{"type":48,"value":929}," suffix) belong to this repo. Third-party dependencies have ",{"type":42,"tag":57,"props":931,"children":933},{"className":932},[],[934],{"type":48,"value":935},"@v...",{"type":48,"value":937}," in the path (e.g. ",{"type":42,"tag":57,"props":939,"children":941},{"className":940},[],[942],{"type":48,"value":943},"github.com\u002Fgrafana\u002Fdskit@v0.0.0-...\u002Fmiddleware\u002Finstrument.go",{"type":48,"value":945},").",{"type":42,"tag":82,"props":947,"children":948},{},[949,954,955,960,962],{"type":42,"tag":324,"props":950,"children":951},{},[952],{"type":48,"value":953},"Strip the module prefix",{"type":48,"value":322},{"type":42,"tag":57,"props":956,"children":958},{"className":957},[],[959],{"type":48,"value":919},{"type":48,"value":961}," to get the relative file path. For example:",{"type":42,"tag":78,"props":963,"children":964},{},[965,984],{"type":42,"tag":82,"props":966,"children":967},{},[968,974,976,982],{"type":42,"tag":57,"props":969,"children":971},{"className":970},[],[972],{"type":48,"value":973},"github.com\u002Fgrafana\u002Fpyroscope\u002Fpkg\u002Fdistributor\u002Fdistributor.go:380",{"type":48,"value":975}," -> ",{"type":42,"tag":57,"props":977,"children":979},{"className":978},[],[980],{"type":48,"value":981},"pkg\u002Fdistributor\u002Fdistributor.go",{"type":48,"value":983}," line 380",{"type":42,"tag":82,"props":985,"children":986},{},[987,993,994,1000],{"type":42,"tag":57,"props":988,"children":990},{"className":989},[],[991],{"type":48,"value":992},"github.com\u002Fgrafana\u002Fpyroscope\u002Fpkg\u002Fpprof\u002Ffix_go_profile.go:59",{"type":48,"value":975},{"type":42,"tag":57,"props":995,"children":997},{"className":996},[],[998],{"type":48,"value":999},"pkg\u002Fpprof\u002Ffix_go_profile.go",{"type":48,"value":1001}," line 59",{"type":42,"tag":82,"props":1003,"children":1004},{},[1005,1010,1012,1018,1020,1026,1028,1034,1036,1042,1044,1049],{"type":42,"tag":324,"props":1006,"children":1007},{},[1008],{"type":48,"value":1009},"Check the git ref (if available)",{"type":48,"value":1011},": The pprof Build ID line may contain JSON with a ",{"type":42,"tag":57,"props":1013,"children":1015},{"className":1014},[],[1016],{"type":48,"value":1017},"git_ref",{"type":48,"value":1019}," field (e.g. ",{"type":42,"tag":57,"props":1021,"children":1023},{"className":1022},[],[1024],{"type":48,"value":1025},"\"git_ref\":\"327c1448a\"",{"type":48,"value":1027},"). If present, compare it against the current HEAD with ",{"type":42,"tag":57,"props":1029,"children":1031},{"className":1030},[],[1032],{"type":48,"value":1033},"git log --oneline -1",{"type":48,"value":1035},". If they differ, warn the user that line numbers may not match exactly because the profile was built from a different commit. Use ",{"type":42,"tag":57,"props":1037,"children":1039},{"className":1038},[],[1040],{"type":48,"value":1041},"git log --oneline \u003Cgit_ref>..HEAD -- \u003Cfile>",{"type":48,"value":1043}," to check if the specific files have changed. If the Build ID is empty or doesn't contain a ",{"type":42,"tag":57,"props":1045,"children":1047},{"className":1046},[],[1048],{"type":48,"value":1017},{"type":48,"value":1050},", skip this check and note that you cannot verify whether the source matches the profiled binary.",{"type":42,"tag":82,"props":1052,"children":1053},{},[1054,1059],{"type":42,"tag":324,"props":1055,"children":1056},{},[1057],{"type":48,"value":1058},"Read the source",{"type":48,"value":1060}," directly using the relative file path and line number from the pprof output. Read a window around the reported line (e.g. 20 lines before and after) for context.",{"type":42,"tag":82,"props":1062,"children":1063},{},[1064,1069,1071],{"type":42,"tag":324,"props":1065,"children":1066},{},[1067],{"type":48,"value":1068},"For the function name",{"type":48,"value":1070},", extract the method\u002Ffunction from the fully-qualified name:",{"type":42,"tag":78,"props":1072,"children":1073},{},[1074,1107],{"type":42,"tag":82,"props":1075,"children":1076},{},[1077,1083,1085,1091,1093,1099,1101],{"type":42,"tag":57,"props":1078,"children":1080},{"className":1079},[],[1081],{"type":48,"value":1082},"pkg\u002Fdistributor.(*Distributor).PushBatch.func1",{"type":48,"value":1084}," -> method ",{"type":42,"tag":57,"props":1086,"children":1088},{"className":1087},[],[1089],{"type":48,"value":1090},"PushBatch",{"type":48,"value":1092}," on ",{"type":42,"tag":57,"props":1094,"children":1096},{"className":1095},[],[1097],{"type":48,"value":1098},"*Distributor",{"type":48,"value":1100},", closure ",{"type":42,"tag":57,"props":1102,"children":1104},{"className":1103},[],[1105],{"type":48,"value":1106},".func1",{"type":42,"tag":82,"props":1108,"children":1109},{},[1110,1116,1118,1124,1126],{"type":42,"tag":57,"props":1111,"children":1113},{"className":1112},[],[1114],{"type":48,"value":1115},"pkg\u002Fpprof.DropGoTypeParameters",{"type":48,"value":1117}," -> function ",{"type":42,"tag":57,"props":1119,"children":1121},{"className":1120},[],[1122],{"type":48,"value":1123},"DropGoTypeParameters",{"type":48,"value":1125}," in package ",{"type":42,"tag":57,"props":1127,"children":1129},{"className":1128},[],[1130],{"type":48,"value":149},{"type":42,"tag":51,"props":1132,"children":1133},{},[1134],{"type":48,"value":1135},"For third-party or standard library functions, note them in the analysis if they are significant:",{"type":42,"tag":78,"props":1137,"children":1138},{},[1139,1149,1168,1185,1203],{"type":42,"tag":82,"props":1140,"children":1141},{},[1142,1147],{"type":42,"tag":57,"props":1143,"children":1145},{"className":1144},[],[1146],{"type":48,"value":834},{"type":48,"value":1148}," = excessive allocations",{"type":42,"tag":82,"props":1150,"children":1151},{},[1152,1158,1160,1166],{"type":42,"tag":57,"props":1153,"children":1155},{"className":1154},[],[1156],{"type":48,"value":1157},"runtime.chanrecv",{"type":48,"value":1159}," \u002F ",{"type":42,"tag":57,"props":1161,"children":1163},{"className":1162},[],[1164],{"type":48,"value":1165},"runtime.chansend",{"type":48,"value":1167}," = channel blocking",{"type":42,"tag":82,"props":1169,"children":1170},{},[1171,1176,1177,1183],{"type":42,"tag":57,"props":1172,"children":1174},{"className":1173},[],[1175],{"type":48,"value":842},{"type":48,"value":1159},{"type":42,"tag":57,"props":1178,"children":1180},{"className":1179},[],[1181],{"type":48,"value":1182},"runtime.lock",{"type":48,"value":1184}," = lock contention",{"type":42,"tag":82,"props":1186,"children":1187},{},[1188,1194,1195,1201],{"type":42,"tag":57,"props":1189,"children":1191},{"className":1190},[],[1192],{"type":48,"value":1193},"runtime.gcBgMarkWorker",{"type":48,"value":1159},{"type":42,"tag":57,"props":1196,"children":1198},{"className":1197},[],[1199],{"type":48,"value":1200},"runtime.gcDrain",{"type":48,"value":1202}," = GC pressure",{"type":42,"tag":82,"props":1204,"children":1205},{},[1206,1212,1213,1219],{"type":42,"tag":57,"props":1207,"children":1209},{"className":1208},[],[1210],{"type":48,"value":1211},"compress\u002Fgzip",{"type":48,"value":732},{"type":42,"tag":57,"props":1214,"children":1216},{"className":1215},[],[1217],{"type":48,"value":1218},"compress\u002Fflate",{"type":48,"value":1220}," = compression overhead",{"type":42,"tag":71,"props":1222,"children":1224},{"id":1223},"step-7-deliver-analysis",[1225],{"type":48,"value":1226},"Step 7: Deliver analysis",{"type":42,"tag":51,"props":1228,"children":1229},{},[1230],{"type":48,"value":1231},"Present a structured report:",{"type":42,"tag":1233,"props":1234,"children":1236},"h3",{"id":1235},"summary",[1237],{"type":48,"value":1238},"Summary",{"type":42,"tag":51,"props":1240,"children":1241},{},[1242],{"type":48,"value":1243},"A 2-3 sentence overview of the performance profile.",{"type":42,"tag":1233,"props":1245,"children":1247},{"id":1246},"top-hot-functions",[1248],{"type":48,"value":1249},"Top Hot Functions",{"type":42,"tag":51,"props":1251,"children":1252},{},[1253],{"type":48,"value":1254},"A ranked table of the most significant functions with:",{"type":42,"tag":78,"props":1256,"children":1257},{},[1258,1263,1268,1273],{"type":42,"tag":82,"props":1259,"children":1260},{},[1261],{"type":48,"value":1262},"Function name",{"type":42,"tag":82,"props":1264,"children":1265},{},[1266],{"type":48,"value":1267},"Flat \u002F cumulative sample percentages",{"type":42,"tag":82,"props":1269,"children":1270},{},[1271],{"type":48,"value":1272},"Source file and line number (for repo functions)",{"type":42,"tag":82,"props":1274,"children":1275},{},[1276],{"type":48,"value":1277},"Brief description of what the function does",{"type":42,"tag":1233,"props":1279,"children":1281},{"id":1280},"source-code-analysis",[1282],{"type":48,"value":1283},"Source Code Analysis",{"type":42,"tag":51,"props":1285,"children":1286},{},[1287],{"type":48,"value":1288},"For each hot function in this repository:",{"type":42,"tag":78,"props":1290,"children":1291},{},[1292,1297,1302],{"type":42,"tag":82,"props":1293,"children":1294},{},[1295],{"type":48,"value":1296},"Show the relevant code snippet",{"type":42,"tag":82,"props":1298,"children":1299},{},[1300],{"type":48,"value":1301},"Explain why it might be hot",{"type":42,"tag":82,"props":1303,"children":1304},{},[1305],{"type":48,"value":1306},"Suggest specific optimizations if applicable (e.g., reduce allocations, cache results, use sync.Pool, reduce lock contention)",{"type":42,"tag":1233,"props":1308,"children":1310},{"id":1309},"recommendations",[1311],{"type":48,"value":1312},"Recommendations",{"type":42,"tag":51,"props":1314,"children":1315},{},[1316],{"type":48,"value":1317},"Prioritized list of actionable optimization suggestions, ordered by expected impact.",{"type":42,"tag":71,"props":1319,"children":1321},{"id":1320},"error-handling",[1322],{"type":48,"value":1323},"Error Handling",{"type":42,"tag":78,"props":1325,"children":1326},{},[1327,1343,1360,1381,1413],{"type":42,"tag":82,"props":1328,"children":1329},{},[1330,1335,1337],{"type":42,"tag":324,"props":1331,"children":1332},{},[1333],{"type":48,"value":1334},"profilecli not found and download fails",{"type":48,"value":1336},": Tell the user to manually download from ",{"type":42,"tag":128,"props":1338,"children":1341},{"href":1339,"rel":1340},"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fpyroscope\u002Freleases\u002Flatest",[132],[1342],{"type":48,"value":1339},{"type":42,"tag":82,"props":1344,"children":1345},{},[1346,1351,1353,1358],{"type":42,"tag":324,"props":1347,"children":1348},{},[1349],{"type":48,"value":1350},"Connection errors",{"type":48,"value":1352},": Suggest checking ",{"type":42,"tag":57,"props":1354,"children":1356},{"className":1355},[],[1357],{"type":48,"value":320},{"type":48,"value":1359}," value and network connectivity",{"type":42,"tag":82,"props":1361,"children":1362},{},[1363,1368,1369,1374,1375],{"type":42,"tag":324,"props":1364,"children":1365},{},[1366],{"type":48,"value":1367},"Authentication errors (401\u002F403)",{"type":48,"value":1352},{"type":42,"tag":57,"props":1370,"children":1372},{"className":1371},[],[1373],{"type":48,"value":344},{"type":48,"value":494},{"type":42,"tag":57,"props":1376,"children":1378},{"className":1377},[],[1379],{"type":48,"value":1380},"PROFILECLI_TENANT_ID",{"type":42,"tag":82,"props":1382,"children":1383},{},[1384,1389,1391,1397,1399,1405,1407],{"type":42,"tag":324,"props":1385,"children":1386},{},[1387],{"type":48,"value":1388},"Empty results",{"type":48,"value":1390},": Try broader time ranges (",{"type":42,"tag":57,"props":1392,"children":1394},{"className":1393},[],[1395],{"type":48,"value":1396},"now-6h",{"type":48,"value":1398},", ",{"type":42,"tag":57,"props":1400,"children":1402},{"className":1401},[],[1403],{"type":48,"value":1404},"now-24h",{"type":48,"value":1406},"), verify the service name via ",{"type":42,"tag":57,"props":1408,"children":1410},{"className":1409},[],[1411],{"type":48,"value":1412},"query series",{"type":42,"tag":82,"props":1414,"children":1415},{},[1416,1421],{"type":42,"tag":324,"props":1417,"children":1418},{},[1419],{"type":48,"value":1420},"Service not found",{"type":48,"value":1422},": List available services from Step 4 and ask the user to pick one",{"type":42,"tag":1424,"props":1425,"children":1426},"style",{},[1427],{"type":48,"value":1428},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1430,"total":1618},[1431,1450,1469,1489,1504,1520,1533,1548,1565,1578,1591,1606],{"slug":1432,"name":1432,"fn":1433,"description":1434,"org":1435,"tags":1436,"stars":1447,"repoUrl":1448,"updatedAt":1449},"faro-setup-web","instrument web apps with Grafana Faro","Instruments a web app with Grafana Faro Web SDK for frontend observability. Use when setting up error tracking, Web Vitals, session monitoring, or distributed tracing in a browser app.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1437,1440,1443,1446],{"name":1438,"slug":1439,"type":15},"Distributed Tracing","distributed-tracing",{"name":1441,"slug":1442,"type":15},"Frontend","frontend",{"name":1444,"slug":1445,"type":15},"Monitoring","monitoring",{"name":13,"slug":14,"type":15},1103,"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Ffaro-web-sdk","2026-07-12T07:43:24.63314",{"slug":1451,"name":1451,"fn":1452,"description":1453,"org":1454,"tags":1455,"stars":1466,"repoUrl":1467,"updatedAt":1468},"configuring-yesoreyeram-infinity-datasource","configure Grafana Infinity data source","Configure the Infinity data source — base URL and allowed hosts, the authentication methods (basic, bearer token, API key, digest, OAuth passthrough, OAuth 2.0 client credentials\u002FJWT, Azure, Azure Blob, AWS), TLS, custom HTTP headers, network and security settings, the custom health check, and provisioning with a config file. Use when a user asks how to set up, configure, or change settings for the Infinity data source; how to authenticate to an API; how to allow hosts; how to provision it as YAML; or how to troubleshoot connection, authentication, or health-check issues.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1456,1459,1462,1465],{"name":1457,"slug":1458,"type":15},"API Development","api-development",{"name":1460,"slug":1461,"type":15},"Authentication","authentication",{"name":1463,"slug":1464,"type":15},"Configuration","configuration",{"name":9,"slug":8,"type":15},1056,"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fgrafana-infinity-datasource","2026-07-12T07:43:25.939136",{"slug":1470,"name":1470,"fn":1471,"description":1472,"org":1473,"tags":1474,"stars":1466,"repoUrl":1467,"updatedAt":1488},"querying-yesoreyeram-infinity-datasource","query data with Infinity datasource","Build queries with the Infinity data source — the query types (JSON, CSV, TSV, XML, GraphQL, HTML, UQL, GROQ, Google Sheets, Series, Transformations), the parsers (Frontend\u002Fsimple, Backend JSONata, JQ, UQL, GROQ) and which support alerting, the sources (URL, Inline, Reference, Azure Blob, Random walk), output formats (table, timeseries, logs, trace, node graph, dataframe), root selector and columns, computed columns\u002Ffilters\u002Fsummarize, pagination, and template variables. Use when a user asks how to query Infinity; how to fetch JSON\u002FCSV\u002FXML\u002FGraphQL\u002FHTML from a URL or inline; how to select rows and columns; how to transform data with UQL\u002FGROQ\u002FJSONata\u002FJQ; how to make a query work with alerting; how to paginate; or how to use variables in a query.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1475,1478,1481,1482,1485],{"name":1476,"slug":1477,"type":15},"CSV","csv",{"name":1479,"slug":1480,"type":15},"Data Analysis","data-analysis",{"name":9,"slug":8,"type":15},{"name":1483,"slug":1484,"type":15},"GraphQL","graphql",{"name":1486,"slug":1487,"type":15},"JSON","json","2026-07-15T05:34:05.773947",{"slug":1490,"name":1490,"fn":1491,"description":1492,"org":1493,"tags":1494,"stars":1501,"repoUrl":1502,"updatedAt":1503},"agento11y","manage Grafana Agent Observability resources","Inspects and manages Grafana Agent Observability resources via gcx: conversations, generations, evaluators, rules, scores, and templates. Use when the user wants to list or search conversations, inspect generations, manage evaluators (upsert, test, delete), set up evaluation rules, check scores, or browse evaluator templates. Trigger on phrases like \"list conversations\", \"search generations\", \"what did the agent do\", \"debug LLM conversation\", \"create evaluator\", \"set up evaluation rule\", \"test evaluator\", \"check scores\", \"evaluate generation quality\", or \"set up online evaluation\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1495,1498,1499,1500],{"name":1496,"slug":1497,"type":15},"Agents","agents",{"name":9,"slug":8,"type":15},{"name":1444,"slug":1445,"type":15},{"name":13,"slug":14,"type":15},430,"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fgcx","2026-07-25T05:30:40.29622",{"slug":1505,"name":1505,"fn":1506,"description":1507,"org":1508,"tags":1509,"stars":1501,"repoUrl":1502,"updatedAt":1519},"agento11y-instrument","instrument LLM apps for agent observability","Sets up and instruments a developer's own LLM app or agent to send generations and agentic workflow to Grafana Agent Observability (the Agent Observability SDKs) — greenfield setup, fixing broken instrumentation, or filling gaps in existing instrumentation. Uses gcx for the parts a static prompt can't do: `gcx login` \u002F `gcx cloud stacks` to find the stack, and `gcx agento11y agents|conversations|generations` to VERIFY that data actually lands — so it iterates (instrument → run → verify → fix) until generations arrive, not blindly. Reads the app's code, detects language\u002Fframework, classifies instrumentation state (none \u002F partial \u002F broken), then runs a fixed gap checklist whose #1 item is the silent failure no other prompt catches: the SDK emits OTel spans\u002Fmetrics but never creates a TracerProvider\u002FMeterProvider, so without them all metrics go to a no-op and are lost. Also checks agent_version (required for per-version Performance charts), set_result completeness, SYNC vs STREAM, parent_generation_ids DAG links, and workflow-step coverage. Recommends changes citing file:line and, only with explicit confirmation, applies minimal diffs that don't change app behavior. Pulls SDK reference from agento11y's llms.txt rather than restating it, and hands off to `agento11y-test-starter` once data flows. It does NOT write test suites or set up tenant evaluations, rules, or guards — offline test suites are `agento11y-test-starter`, tenant eval rules + guards are `agento11y-prod-setup`; does NOT install coding-agent telemetry plugins (that is llms.txt \"Path A\"); does NOT mint or store credentials or invent endpoints. Trigger on phrases like \"instrument my app\", \"send my agent's traces to Grafana\", \"set up AI observability for my app\", \"my generations aren't showing up\", \"why is Performance empty\", \"add Agent Observability to my code\", \"fix my instrumentation\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1510,1511,1512,1515,1518],{"name":1496,"slug":1497,"type":15},{"name":9,"slug":8,"type":15},{"name":1513,"slug":1514,"type":15},"Instrumentation","instrumentation",{"name":1516,"slug":1517,"type":15},"LLM","llm",{"name":13,"slug":14,"type":15},"2026-07-31T05:53:52.580237",{"slug":1521,"name":1521,"fn":1522,"description":1523,"org":1524,"tags":1525,"stars":1501,"repoUrl":1502,"updatedAt":1532},"agento11y-prod-setup","setup production evaluation for AI agents","Sets up production evaluation and guardrails for a DEPLOYED AI agent in Grafana Agent Observability, grounded in the agent's own code and its real ingested traffic. The judgment layer on top of the `agento11y` skill: it reads the agent's source (system prompt, tools, entrypoint) AND samples its live traffic via gcx, checks what evaluators\u002Frules\u002Fguards already exist, then recommends only what's missing — online eval rules (score live conversations for regressions) and guards (warn-first request-path policies that redact \u002F tool-filter and may later be promoted to deny). It drafts reviewable YAML and, only with explicit confirmation, applies via `gcx agento11y`. New guards are drafted in warn mode (safe on live traffic — warn records but never blocks). It DOES create stack-level objects — that is the point — but every write is confirmed. It never rewrites or redeploys the agent. Trigger on phrases like \"set up production evaluation\", \"my agent is in prod what should I evaluate\", \"catch quality regressions\", \"add guardrails to my agent\", \"redact PII from my agent\", \"block dangerous tools\", \"set up online evals and guards\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1526,1527,1530,1531],{"name":1496,"slug":1497,"type":15},{"name":1528,"slug":1529,"type":15},"Evals","evals",{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},"2026-07-31T05:53:53.576347",{"slug":1534,"name":1534,"fn":1535,"description":1536,"org":1537,"tags":1538,"stars":1501,"repoUrl":1502,"updatedAt":1547},"agento11y-test-starter","build and run agent test suites","Use early in an AI-agent project — before ship, before real traffic — to build a starter test suite for the agent and run it offline. Reads the agent's own code (system prompt, tools, task), writes a labeled draft suite of test cases (happy\u002Fedge\u002Fadversarial) grounded in real lines, and recommends how to score each case (the evaluators\u002Fjudges the offline runner uses). Assesses how runnable the agent is: for an easily-invoked agent it generates a runner stub (run_experiment.py) with two holes to fill and can optionally run it (only with permission, only against the endpoint the developer configured); for agents needing a harness or full runtime it points to the existing eval infra. It runs OFFLINE and never creates tenant-level evaluators, rules, or guards — that is `agento11y-prod-setup`, for a deployed agent with real traffic. Trigger on phrases like \"how do I test my agent before shipping\", \"write test cases for my agent\", \"set up tests for my agent\", \"check my agent before prod\", \"I have no traffic yet, how do I evaluate it\", \"test my agent offline\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1539,1540,1541,1544],{"name":1496,"slug":1497,"type":15},{"name":9,"slug":8,"type":15},{"name":1542,"slug":1543,"type":15},"QA","qa",{"name":1545,"slug":1546,"type":15},"Testing","testing","2026-07-31T05:53:51.62785",{"slug":1549,"name":1549,"fn":1550,"description":1551,"org":1552,"tags":1553,"stars":1501,"repoUrl":1502,"updatedAt":1564},"create-dashboard","create Grafana dashboards with gcx","Designs and creates Grafana dashboards with gcx, using `gcx dashboards snapshot` as a visual feedback loop. Use when the user wants to create a new Grafana dashboard, add panels, variables, or annotations to an existing dashboard, design dashboard panels, variables, queries, or layout, or make a material visual redesign. Triggers on \"create dashboard\", \"new dashboard\", \"build dashboard\", \"dashboard for \u003Cservice>\", \"add panels\", \"add variable\", \"add annotation\", \"improve this dashboard\", or \"iterate on a dashboard\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1554,1557,1560,1563],{"name":1555,"slug":1556,"type":15},"Dashboards","dashboards",{"name":1558,"slug":1559,"type":15},"Data Visualization","data-visualization",{"name":1561,"slug":1562,"type":15},"Design","design",{"name":9,"slug":8,"type":15},"2026-07-25T05:30:46.289717",{"slug":1566,"name":1566,"fn":1567,"description":1568,"org":1569,"tags":1570,"stars":1501,"repoUrl":1502,"updatedAt":1577},"debug-with-grafana","investigate application issues with Grafana","Structured workflow for investigating application problems with Grafana observability data (metrics, logs, traces) via gcx. Covers live firefighting AND retrospective incident analysis: incident triage, root-cause analysis, blast-radius checks (did an incident spill into other services), verifying whether a deployment or rollout triggered an incident, finding which service, endpoint, or path owns the most errors or slow requests, checking whether retries or queue backlogs piled up, and quantifying error or latency shares over a time window. Trigger on: \"my API is returning 500 errors\", \"latency is spiking\", \"investigate why requests are failing\", \"triage the incident\", \"blast radius\", \"root cause\", \"did the rollout cause it\", \"which endpoint owns the most 5xx\", \"did retries pile up\", or any request to analyse an earlier incident window using telemetry. For authoring dashboards use create-dashboard; for dashboard inventory use manage-dashboards.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1571,1572,1573,1576],{"name":21,"slug":22,"type":15},{"name":9,"slug":8,"type":15},{"name":1574,"slug":1575,"type":15},"Incident Response","incident-response",{"name":13,"slug":14,"type":15},"2026-07-18T05:11:10.445428",{"slug":1579,"name":1579,"fn":1580,"description":1581,"org":1582,"tags":1583,"stars":1501,"repoUrl":1502,"updatedAt":1590},"diagnose-entity-graph","diagnose Grafana Entity Graph issues","Diagnose Entity Graph problems: missing entities, missing edges, disconnected clusters, or filtering issues. Use when the user reports that Entity Graph doesn't look right, services are missing, edges aren't appearing, or environments can't be filtered. Triggers for: \"entity graph is empty\", \"services missing from entity graph\", \"no edges in entity graph\", \"disconnected services\", \"can't filter entity graph\", \"entity graph not working\", \"diagnose entity graph\", \"debug knowledge graph\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1584,1585,1586,1589],{"name":21,"slug":22,"type":15},{"name":9,"slug":8,"type":15},{"name":1587,"slug":1588,"type":15},"Graph Analysis","graph-analysis",{"name":13,"slug":14,"type":15},"2026-07-25T05:30:39.380934",{"slug":1592,"name":1592,"fn":1593,"description":1594,"org":1595,"tags":1596,"stars":1501,"repoUrl":1502,"updatedAt":1605},"gcx","manage Grafana Cloud resources via gcx","Manages Grafana Cloud resources via the gcx CLI. Trigger when the user wants to inspect, create, update, delete, query, or automate any Grafana resource - dashboards, datasources, alerts, SLOs, synthetic checks, oncall, incidents, fleet, k6, knowledge graph, or adaptive telemetry.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1597,1600,1601,1602],{"name":1598,"slug":1599,"type":15},"CLI","cli",{"name":9,"slug":8,"type":15},{"name":1444,"slug":1445,"type":15},{"name":1603,"slug":1604,"type":15},"Operations","operations","2026-07-31T05:53:50.587304",{"slug":1607,"name":1607,"fn":1608,"description":1609,"org":1610,"tags":1611,"stars":1501,"repoUrl":1502,"updatedAt":1617},"gcx-demo","present gcx demo tours","Run a narrated, read-only demo tour of gcx for customer or colleague presentations. Showcases the breadth of gcx across every Grafana Cloud product area — resources, datasources, metrics, logs, traces, SLOs, alerts, synthetic monitoring, IRM, k6, fleet, and more. All commands are strictly read-only. Trigger when the user says \"demo gcx\", \"show off gcx\", \"customer demo\", \"gcx tour\", or \"\u002Fgcx-demo\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1612,1613,1614],{"name":1598,"slug":1599,"type":15},{"name":9,"slug":8,"type":15},{"name":1615,"slug":1616,"type":15},"Presentations","presentations","2026-07-25T05:30:45.282458",80,{"items":1620,"total":109},[1621],{"slug":4,"name":4,"fn":5,"description":6,"org":1622,"tags":1623,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1624,1625,1626,1627],{"name":21,"slug":22,"type":15},{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":17,"slug":18,"type":15}]