[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-grafana-reconciler-logic":3,"mdc-n2o3iz-key":31,"related-repo-grafana-reconciler-logic":1183,"related-org-grafana-reconciler-logic":1298},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":20,"repoUrl":21,"updatedAt":22,"license":23,"forks":24,"topics":25,"repo":26,"sourceUrl":29,"mdContent":30},"reconciler-logic","implement reconcilers for Grafana apps","Implement reconcilers and watchers for grafana-app-sdk apps — write `TypedReconciler[*MyKind]` reconcile functions, apply generation-based skip patterns, do conflict-safe status updates via `resource.UpdateObject`, configure `BasicReconcileOptions` (namespace, label\u002Ffield filters, finalizer management), use `Watcher` for event-style handling, reconcile `UnmanagedKinds` (resources your app doesn't own), and register the whole thing in `app.go`. Use when writing a reconciler, implementing the reconcile loop, adding async business logic, handling create\u002Fupdate\u002Fdelete events, processing resource state changes, scheduling periodic resyncs with `RequeueAfter`, picking between Watcher and Reconciler, or wiring a controller into `app.go` — even when the user says \"process this resource\", \"handle X events\", or \"write a controller\" without saying \"reconciler\".",{"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,17],{"name":13,"slug":14,"type":15},"Architecture","architecture","tag",{"name":9,"slug":8,"type":15},{"name":18,"slug":19,"type":15},"Engineering","engineering",189,"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fskills","2026-07-12T07:45:04.862963","Apache-2.0",16,[],{"repoUrl":21,"stars":20,"forks":24,"topics":27,"description":28},[],null,"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Fgrafana-app-sdk\u002Freconciler-logic","---\nname: reconciler-logic\nlicense: Apache-2.0\ndescription: Implement reconcilers and watchers for grafana-app-sdk apps — write `TypedReconciler[*MyKind]` reconcile functions, apply generation-based skip patterns, do conflict-safe status updates via `resource.UpdateObject`, configure `BasicReconcileOptions` (namespace, label\u002Ffield filters, finalizer management), use `Watcher` for event-style handling, reconcile `UnmanagedKinds` (resources your app doesn't own), and register the whole thing in `app.go`. Use when writing a reconciler, implementing the reconcile loop, adding async business logic, handling create\u002Fupdate\u002Fdelete events, processing resource state changes, scheduling periodic resyncs with `RequeueAfter`, picking between Watcher and Reconciler, or wiring a controller into `app.go` — even when the user says \"process this resource\", \"handle X events\", or \"write a controller\" without saying \"reconciler\".\n---\n\n# Reconciler Logic\n\nReconcilers are the async business-logic layer of a grafana-app-sdk app. The SDK enqueues a reconcile event when a resource is created, updated, or deleted; the reconciler observes the current state and drives the system toward the desired state.\n\n## Common Workflows\n\n### Implementing a new reconciler end-to-end\n\n```bash\n# 1. Generate operator stubs for a standalone app\ngrafana-app-sdk project component add operator\n\n# 2. Implement the ReconcileFunc — see § TypedReconciler below for the pattern\n\n# 3. Register the reconciler in app.go (see references\u002Fregistration.md)\n\n# 4. Generate, build, and verify it runs\ngrafana-app-sdk generate\ngo build .\u002F...\ngo run .\u002Fcmd\u002Foperator   # tail logs — reconcile entries should appear when you kubectl-apply a resource\n```\n\nIf the operator starts but no reconcile events fire when you create a resource:\n- Check `BasicReconcileOptions.Namespace` matches the resource's namespace\n- Check `BasicReconcileOptions.LabelFilters` \u002F `FieldSelectors` — most \"no events\" issues are filter mismatches (`kubectl get \u003Cresource> -o yaml` to see labels)\n- Confirm the reconciler was attached to the right (latest) version of the kind\n\n## TypedReconciler — preferred pattern\n\n`operator.TypedReconciler` handles type assertion and provides a strongly-typed `ReconcileFunc`:\n\n```go\ntype MyKindReconciler struct {\n    operator.TypedReconciler[*v1alpha1.MyKind]\n    client resource.Client\n}\n\nfunc NewMyKindReconciler(client resource.Client) *MyKindReconciler {\n    r := &MyKindReconciler{client: client}\n    r.ReconcileFunc = r.reconcile  \u002F\u002F wire the typed func\n    return r\n}\n\nfunc (r *MyKindReconciler) reconcile(\n    ctx context.Context,\n    req operator.TypedReconcileRequest[*v1alpha1.MyKind],\n) (operator.ReconcileResult, error) {\n    obj := req.Object\n\n    \u002F\u002F Skip if already reconciled this generation\n    if obj.GetGeneration() == obj.Status.LastObservedGeneration &&\n       req.Action != operator.ReconcileActionDeleted {\n        return operator.ReconcileResult{}, nil\n    }\n\n    log := logging.FromContext(ctx).With(\"name\", obj.GetName(), \"namespace\", obj.GetNamespace())\n    log.Info(\"reconciling\", \"action\", operator.ResourceActionFromReconcileAction(req.Action))\n\n    if req.Action == operator.ReconcileActionDeleted {\n        return operator.ReconcileResult{}, nil\n    }\n\n    \u002F\u002F ... business logic ...\n\n    \u002F\u002F Atomic status update — see § Status updates below\n    _, err := resource.UpdateObject(ctx, r.client, obj.GetStaticMetadata().Identifier(),\n        func(obj *v1alpha1.MyKind, _ bool) (*v1alpha1.MyKind, error) {\n            obj.Status.LastObservedGeneration = obj.GetGeneration()\n            obj.Status.State = \"Ready\"\n            return obj, nil\n        },\n        resource.UpdateOptions{Subresource: \"status\"},\n    )\n    return operator.ReconcileResult{}, err\n}\n```\n\n`ReconcileAction` values: `ReconcileActionCreated`, `ReconcileActionUpdated`, `ReconcileActionDeleted`, `ReconcileActionResynced`.\n\nTo requeue after a delay (e.g. polling an external system):\n\n```go\nreturn operator.ReconcileResult{RequeueAfter: 10 * time.Second}, nil\n```\n\n## Status updates with `resource.UpdateObject`\n\nAlways use `resource.UpdateObject` for status writes — it fetches the latest version before applying your update function, avoiding `409 Conflict` errors when multiple reconcile events race:\n\n```go\n_, err := resource.UpdateObject(ctx, r.client, identifier,\n    func(obj *v1alpha1.MyKind, exists bool) (*v1alpha1.MyKind, error) {\n        obj.Status.LastObservedGeneration = obj.GetGeneration()\n        obj.Status.State = \"Ready\"\n        obj.Status.Message = \"\"\n        return obj, nil\n    },\n    resource.UpdateOptions{Subresource: \"status\"},\n)\n```\n\nDo **not** use `client.Update` for status — it sends the full object and races with spec changes made by users.\n\n## Generation-based skip\n\nCheck `LastObservedGeneration` at the top of the reconcile function to avoid re-processing unchanged resources:\n\n```go\nif obj.GetGeneration() == obj.Status.LastObservedGeneration {\n    return operator.ReconcileResult{}, nil\n}\n```\n\n## `ReconcileOptions`\n\nControl informer behavior via `BasicReconcileOptions` on the `AppManagedKind` entry:\n\n```go\n{\n    Kind:       mykindv1alpha1.MyKindKind(),\n    Reconciler: reconciler,\n    ReconcileOptions: simple.BasicReconcileOptions{\n        Namespace:      \"my-namespace\",          \u002F\u002F watch one namespace; default is all\n        LabelFilters:   []string{\"env=prod\"},    \u002F\u002F only reconcile matching resources\n        FieldSelectors: []string{\"status.phase=Running\"},\n        UsePlain:       false,                   \u002F\u002F false = wrap in OpinionatedReconciler (default; manages finalizers)\n    },\n},\n```\n\n`UsePlain: false` (the default) wraps your reconciler in `OpinionatedReconciler`, which manages finalizers automatically so the SDK can guarantee clean deletion.\n\n## References\n\n- [`references\u002Fwatchers.md`](references\u002Fwatchers.md) — `Watcher` alternative (event-style Add\u002FUpdate\u002FDelete callbacks) + decision matrix for watcher vs reconciler\n- [`references\u002Funmanaged-kinds.md`](references\u002Funmanaged-kinds.md) — `UnmanagedKinds` for reconciling resources your app doesn't own, with `UseOpinionated: false` guidance and common failure modes\n- [`references\u002Fregistration.md`](references\u002Fregistration.md) — full `app.go` wiring (client setup, multi-version registration, `ValidateManifest`) + common failure modes\n\n## External resources\n\n- [grafana-app-sdk GitHub](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fgrafana-app-sdk)\n- [operator package docs](https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fgrafana\u002Fgrafana-app-sdk\u002Foperator)\n",{"data":32,"body":33},{"name":4,"license":23,"description":6},{"type":34,"children":35},"root",[36,44,50,57,64,227,232,283,289,308,680,721,726,740,752,772,851,872,878,890,920,930,951,1037,1056,1062,1147,1153,1177],{"type":37,"tag":38,"props":39,"children":40},"element","h1",{"id":4},[41],{"type":42,"value":43},"text","Reconciler Logic",{"type":37,"tag":45,"props":46,"children":47},"p",{},[48],{"type":42,"value":49},"Reconcilers are the async business-logic layer of a grafana-app-sdk app. The SDK enqueues a reconcile event when a resource is created, updated, or deleted; the reconciler observes the current state and drives the system toward the desired state.",{"type":37,"tag":51,"props":52,"children":54},"h2",{"id":53},"common-workflows",[55],{"type":42,"value":56},"Common Workflows",{"type":37,"tag":58,"props":59,"children":61},"h3",{"id":60},"implementing-a-new-reconciler-end-to-end",[62],{"type":42,"value":63},"Implementing a new reconciler end-to-end",{"type":37,"tag":65,"props":66,"children":71},"pre",{"className":67,"code":68,"language":69,"meta":70,"style":70},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# 1. Generate operator stubs for a standalone app\ngrafana-app-sdk project component add operator\n\n# 2. Implement the ReconcileFunc — see § TypedReconciler below for the pattern\n\n# 3. Register the reconciler in app.go (see references\u002Fregistration.md)\n\n# 4. Generate, build, and verify it runs\ngrafana-app-sdk generate\ngo build .\u002F...\ngo run .\u002Fcmd\u002Foperator   # tail logs — reconcile entries should appear when you kubectl-apply a resource\n","bash","",[72],{"type":37,"tag":73,"props":74,"children":75},"code",{"__ignoreMap":70},[76,88,119,129,138,146,155,163,172,185,204],{"type":37,"tag":77,"props":78,"children":81},"span",{"class":79,"line":80},"line",1,[82],{"type":37,"tag":77,"props":83,"children":85},{"style":84},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[86],{"type":42,"value":87},"# 1. Generate operator stubs for a standalone app\n",{"type":37,"tag":77,"props":89,"children":91},{"class":79,"line":90},2,[92,98,104,109,114],{"type":37,"tag":77,"props":93,"children":95},{"style":94},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[96],{"type":42,"value":97},"grafana-app-sdk",{"type":37,"tag":77,"props":99,"children":101},{"style":100},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[102],{"type":42,"value":103}," project",{"type":37,"tag":77,"props":105,"children":106},{"style":100},[107],{"type":42,"value":108}," component",{"type":37,"tag":77,"props":110,"children":111},{"style":100},[112],{"type":42,"value":113}," add",{"type":37,"tag":77,"props":115,"children":116},{"style":100},[117],{"type":42,"value":118}," operator\n",{"type":37,"tag":77,"props":120,"children":122},{"class":79,"line":121},3,[123],{"type":37,"tag":77,"props":124,"children":126},{"emptyLinePlaceholder":125},true,[127],{"type":42,"value":128},"\n",{"type":37,"tag":77,"props":130,"children":132},{"class":79,"line":131},4,[133],{"type":37,"tag":77,"props":134,"children":135},{"style":84},[136],{"type":42,"value":137},"# 2. Implement the ReconcileFunc — see § TypedReconciler below for the pattern\n",{"type":37,"tag":77,"props":139,"children":141},{"class":79,"line":140},5,[142],{"type":37,"tag":77,"props":143,"children":144},{"emptyLinePlaceholder":125},[145],{"type":42,"value":128},{"type":37,"tag":77,"props":147,"children":149},{"class":79,"line":148},6,[150],{"type":37,"tag":77,"props":151,"children":152},{"style":84},[153],{"type":42,"value":154},"# 3. Register the reconciler in app.go (see references\u002Fregistration.md)\n",{"type":37,"tag":77,"props":156,"children":158},{"class":79,"line":157},7,[159],{"type":37,"tag":77,"props":160,"children":161},{"emptyLinePlaceholder":125},[162],{"type":42,"value":128},{"type":37,"tag":77,"props":164,"children":166},{"class":79,"line":165},8,[167],{"type":37,"tag":77,"props":168,"children":169},{"style":84},[170],{"type":42,"value":171},"# 4. Generate, build, and verify it runs\n",{"type":37,"tag":77,"props":173,"children":175},{"class":79,"line":174},9,[176,180],{"type":37,"tag":77,"props":177,"children":178},{"style":94},[179],{"type":42,"value":97},{"type":37,"tag":77,"props":181,"children":182},{"style":100},[183],{"type":42,"value":184}," generate\n",{"type":37,"tag":77,"props":186,"children":188},{"class":79,"line":187},10,[189,194,199],{"type":37,"tag":77,"props":190,"children":191},{"style":94},[192],{"type":42,"value":193},"go",{"type":37,"tag":77,"props":195,"children":196},{"style":100},[197],{"type":42,"value":198}," build",{"type":37,"tag":77,"props":200,"children":201},{"style":100},[202],{"type":42,"value":203}," .\u002F...\n",{"type":37,"tag":77,"props":205,"children":207},{"class":79,"line":206},11,[208,212,217,222],{"type":37,"tag":77,"props":209,"children":210},{"style":94},[211],{"type":42,"value":193},{"type":37,"tag":77,"props":213,"children":214},{"style":100},[215],{"type":42,"value":216}," run",{"type":37,"tag":77,"props":218,"children":219},{"style":100},[220],{"type":42,"value":221}," .\u002Fcmd\u002Foperator",{"type":37,"tag":77,"props":223,"children":224},{"style":84},[225],{"type":42,"value":226},"   # tail logs — reconcile entries should appear when you kubectl-apply a resource\n",{"type":37,"tag":45,"props":228,"children":229},{},[230],{"type":42,"value":231},"If the operator starts but no reconcile events fire when you create a resource:",{"type":37,"tag":233,"props":234,"children":235},"ul",{},[236,250,278],{"type":37,"tag":237,"props":238,"children":239},"li",{},[240,242,248],{"type":42,"value":241},"Check ",{"type":37,"tag":73,"props":243,"children":245},{"className":244},[],[246],{"type":42,"value":247},"BasicReconcileOptions.Namespace",{"type":42,"value":249}," matches the resource's namespace",{"type":37,"tag":237,"props":251,"children":252},{},[253,254,260,262,268,270,276],{"type":42,"value":241},{"type":37,"tag":73,"props":255,"children":257},{"className":256},[],[258],{"type":42,"value":259},"BasicReconcileOptions.LabelFilters",{"type":42,"value":261}," \u002F ",{"type":37,"tag":73,"props":263,"children":265},{"className":264},[],[266],{"type":42,"value":267},"FieldSelectors",{"type":42,"value":269}," — most \"no events\" issues are filter mismatches (",{"type":37,"tag":73,"props":271,"children":273},{"className":272},[],[274],{"type":42,"value":275},"kubectl get \u003Cresource> -o yaml",{"type":42,"value":277}," to see labels)",{"type":37,"tag":237,"props":279,"children":280},{},[281],{"type":42,"value":282},"Confirm the reconciler was attached to the right (latest) version of the kind",{"type":37,"tag":51,"props":284,"children":286},{"id":285},"typedreconciler-preferred-pattern",[287],{"type":42,"value":288},"TypedReconciler — preferred pattern",{"type":37,"tag":45,"props":290,"children":291},{},[292,298,300,306],{"type":37,"tag":73,"props":293,"children":295},{"className":294},[],[296],{"type":42,"value":297},"operator.TypedReconciler",{"type":42,"value":299}," handles type assertion and provides a strongly-typed ",{"type":37,"tag":73,"props":301,"children":303},{"className":302},[],[304],{"type":42,"value":305},"ReconcileFunc",{"type":42,"value":307},":",{"type":37,"tag":65,"props":309,"children":312},{"className":310,"code":311,"language":193,"meta":70,"style":70},"language-go shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","type MyKindReconciler struct {\n    operator.TypedReconciler[*v1alpha1.MyKind]\n    client resource.Client\n}\n\nfunc NewMyKindReconciler(client resource.Client) *MyKindReconciler {\n    r := &MyKindReconciler{client: client}\n    r.ReconcileFunc = r.reconcile  \u002F\u002F wire the typed func\n    return r\n}\n\nfunc (r *MyKindReconciler) reconcile(\n    ctx context.Context,\n    req operator.TypedReconcileRequest[*v1alpha1.MyKind],\n) (operator.ReconcileResult, error) {\n    obj := req.Object\n\n    \u002F\u002F Skip if already reconciled this generation\n    if obj.GetGeneration() == obj.Status.LastObservedGeneration &&\n       req.Action != operator.ReconcileActionDeleted {\n        return operator.ReconcileResult{}, nil\n    }\n\n    log := logging.FromContext(ctx).With(\"name\", obj.GetName(), \"namespace\", obj.GetNamespace())\n    log.Info(\"reconciling\", \"action\", operator.ResourceActionFromReconcileAction(req.Action))\n\n    if req.Action == operator.ReconcileActionDeleted {\n        return operator.ReconcileResult{}, nil\n    }\n\n    \u002F\u002F ... business logic ...\n\n    \u002F\u002F Atomic status update — see § Status updates below\n    _, err := resource.UpdateObject(ctx, r.client, obj.GetStaticMetadata().Identifier(),\n        func(obj *v1alpha1.MyKind, _ bool) (*v1alpha1.MyKind, error) {\n            obj.Status.LastObservedGeneration = obj.GetGeneration()\n            obj.Status.State = \"Ready\"\n            return obj, nil\n        },\n        resource.UpdateOptions{Subresource: \"status\"},\n    )\n    return operator.ReconcileResult{}, err\n}\n",[313],{"type":37,"tag":73,"props":314,"children":315},{"__ignoreMap":70},[316,324,332,340,348,355,363,371,379,387,394,401,410,419,428,437,445,453,462,471,480,489,498,506,515,524,532,541,549,557,565,574,582,591,600,609,618,627,636,645,654,663,672],{"type":37,"tag":77,"props":317,"children":318},{"class":79,"line":80},[319],{"type":37,"tag":77,"props":320,"children":321},{},[322],{"type":42,"value":323},"type MyKindReconciler struct {\n",{"type":37,"tag":77,"props":325,"children":326},{"class":79,"line":90},[327],{"type":37,"tag":77,"props":328,"children":329},{},[330],{"type":42,"value":331},"    operator.TypedReconciler[*v1alpha1.MyKind]\n",{"type":37,"tag":77,"props":333,"children":334},{"class":79,"line":121},[335],{"type":37,"tag":77,"props":336,"children":337},{},[338],{"type":42,"value":339},"    client resource.Client\n",{"type":37,"tag":77,"props":341,"children":342},{"class":79,"line":131},[343],{"type":37,"tag":77,"props":344,"children":345},{},[346],{"type":42,"value":347},"}\n",{"type":37,"tag":77,"props":349,"children":350},{"class":79,"line":140},[351],{"type":37,"tag":77,"props":352,"children":353},{"emptyLinePlaceholder":125},[354],{"type":42,"value":128},{"type":37,"tag":77,"props":356,"children":357},{"class":79,"line":148},[358],{"type":37,"tag":77,"props":359,"children":360},{},[361],{"type":42,"value":362},"func NewMyKindReconciler(client resource.Client) *MyKindReconciler {\n",{"type":37,"tag":77,"props":364,"children":365},{"class":79,"line":157},[366],{"type":37,"tag":77,"props":367,"children":368},{},[369],{"type":42,"value":370},"    r := &MyKindReconciler{client: client}\n",{"type":37,"tag":77,"props":372,"children":373},{"class":79,"line":165},[374],{"type":37,"tag":77,"props":375,"children":376},{},[377],{"type":42,"value":378},"    r.ReconcileFunc = r.reconcile  \u002F\u002F wire the typed func\n",{"type":37,"tag":77,"props":380,"children":381},{"class":79,"line":174},[382],{"type":37,"tag":77,"props":383,"children":384},{},[385],{"type":42,"value":386},"    return r\n",{"type":37,"tag":77,"props":388,"children":389},{"class":79,"line":187},[390],{"type":37,"tag":77,"props":391,"children":392},{},[393],{"type":42,"value":347},{"type":37,"tag":77,"props":395,"children":396},{"class":79,"line":206},[397],{"type":37,"tag":77,"props":398,"children":399},{"emptyLinePlaceholder":125},[400],{"type":42,"value":128},{"type":37,"tag":77,"props":402,"children":404},{"class":79,"line":403},12,[405],{"type":37,"tag":77,"props":406,"children":407},{},[408],{"type":42,"value":409},"func (r *MyKindReconciler) reconcile(\n",{"type":37,"tag":77,"props":411,"children":413},{"class":79,"line":412},13,[414],{"type":37,"tag":77,"props":415,"children":416},{},[417],{"type":42,"value":418},"    ctx context.Context,\n",{"type":37,"tag":77,"props":420,"children":422},{"class":79,"line":421},14,[423],{"type":37,"tag":77,"props":424,"children":425},{},[426],{"type":42,"value":427},"    req operator.TypedReconcileRequest[*v1alpha1.MyKind],\n",{"type":37,"tag":77,"props":429,"children":431},{"class":79,"line":430},15,[432],{"type":37,"tag":77,"props":433,"children":434},{},[435],{"type":42,"value":436},") (operator.ReconcileResult, error) {\n",{"type":37,"tag":77,"props":438,"children":439},{"class":79,"line":24},[440],{"type":37,"tag":77,"props":441,"children":442},{},[443],{"type":42,"value":444},"    obj := req.Object\n",{"type":37,"tag":77,"props":446,"children":448},{"class":79,"line":447},17,[449],{"type":37,"tag":77,"props":450,"children":451},{"emptyLinePlaceholder":125},[452],{"type":42,"value":128},{"type":37,"tag":77,"props":454,"children":456},{"class":79,"line":455},18,[457],{"type":37,"tag":77,"props":458,"children":459},{},[460],{"type":42,"value":461},"    \u002F\u002F Skip if already reconciled this generation\n",{"type":37,"tag":77,"props":463,"children":465},{"class":79,"line":464},19,[466],{"type":37,"tag":77,"props":467,"children":468},{},[469],{"type":42,"value":470},"    if obj.GetGeneration() == obj.Status.LastObservedGeneration &&\n",{"type":37,"tag":77,"props":472,"children":474},{"class":79,"line":473},20,[475],{"type":37,"tag":77,"props":476,"children":477},{},[478],{"type":42,"value":479},"       req.Action != operator.ReconcileActionDeleted {\n",{"type":37,"tag":77,"props":481,"children":483},{"class":79,"line":482},21,[484],{"type":37,"tag":77,"props":485,"children":486},{},[487],{"type":42,"value":488},"        return operator.ReconcileResult{}, nil\n",{"type":37,"tag":77,"props":490,"children":492},{"class":79,"line":491},22,[493],{"type":37,"tag":77,"props":494,"children":495},{},[496],{"type":42,"value":497},"    }\n",{"type":37,"tag":77,"props":499,"children":501},{"class":79,"line":500},23,[502],{"type":37,"tag":77,"props":503,"children":504},{"emptyLinePlaceholder":125},[505],{"type":42,"value":128},{"type":37,"tag":77,"props":507,"children":509},{"class":79,"line":508},24,[510],{"type":37,"tag":77,"props":511,"children":512},{},[513],{"type":42,"value":514},"    log := logging.FromContext(ctx).With(\"name\", obj.GetName(), \"namespace\", obj.GetNamespace())\n",{"type":37,"tag":77,"props":516,"children":518},{"class":79,"line":517},25,[519],{"type":37,"tag":77,"props":520,"children":521},{},[522],{"type":42,"value":523},"    log.Info(\"reconciling\", \"action\", operator.ResourceActionFromReconcileAction(req.Action))\n",{"type":37,"tag":77,"props":525,"children":527},{"class":79,"line":526},26,[528],{"type":37,"tag":77,"props":529,"children":530},{"emptyLinePlaceholder":125},[531],{"type":42,"value":128},{"type":37,"tag":77,"props":533,"children":535},{"class":79,"line":534},27,[536],{"type":37,"tag":77,"props":537,"children":538},{},[539],{"type":42,"value":540},"    if req.Action == operator.ReconcileActionDeleted {\n",{"type":37,"tag":77,"props":542,"children":544},{"class":79,"line":543},28,[545],{"type":37,"tag":77,"props":546,"children":547},{},[548],{"type":42,"value":488},{"type":37,"tag":77,"props":550,"children":552},{"class":79,"line":551},29,[553],{"type":37,"tag":77,"props":554,"children":555},{},[556],{"type":42,"value":497},{"type":37,"tag":77,"props":558,"children":560},{"class":79,"line":559},30,[561],{"type":37,"tag":77,"props":562,"children":563},{"emptyLinePlaceholder":125},[564],{"type":42,"value":128},{"type":37,"tag":77,"props":566,"children":568},{"class":79,"line":567},31,[569],{"type":37,"tag":77,"props":570,"children":571},{},[572],{"type":42,"value":573},"    \u002F\u002F ... business logic ...\n",{"type":37,"tag":77,"props":575,"children":577},{"class":79,"line":576},32,[578],{"type":37,"tag":77,"props":579,"children":580},{"emptyLinePlaceholder":125},[581],{"type":42,"value":128},{"type":37,"tag":77,"props":583,"children":585},{"class":79,"line":584},33,[586],{"type":37,"tag":77,"props":587,"children":588},{},[589],{"type":42,"value":590},"    \u002F\u002F Atomic status update — see § Status updates below\n",{"type":37,"tag":77,"props":592,"children":594},{"class":79,"line":593},34,[595],{"type":37,"tag":77,"props":596,"children":597},{},[598],{"type":42,"value":599},"    _, err := resource.UpdateObject(ctx, r.client, obj.GetStaticMetadata().Identifier(),\n",{"type":37,"tag":77,"props":601,"children":603},{"class":79,"line":602},35,[604],{"type":37,"tag":77,"props":605,"children":606},{},[607],{"type":42,"value":608},"        func(obj *v1alpha1.MyKind, _ bool) (*v1alpha1.MyKind, error) {\n",{"type":37,"tag":77,"props":610,"children":612},{"class":79,"line":611},36,[613],{"type":37,"tag":77,"props":614,"children":615},{},[616],{"type":42,"value":617},"            obj.Status.LastObservedGeneration = obj.GetGeneration()\n",{"type":37,"tag":77,"props":619,"children":621},{"class":79,"line":620},37,[622],{"type":37,"tag":77,"props":623,"children":624},{},[625],{"type":42,"value":626},"            obj.Status.State = \"Ready\"\n",{"type":37,"tag":77,"props":628,"children":630},{"class":79,"line":629},38,[631],{"type":37,"tag":77,"props":632,"children":633},{},[634],{"type":42,"value":635},"            return obj, nil\n",{"type":37,"tag":77,"props":637,"children":639},{"class":79,"line":638},39,[640],{"type":37,"tag":77,"props":641,"children":642},{},[643],{"type":42,"value":644},"        },\n",{"type":37,"tag":77,"props":646,"children":648},{"class":79,"line":647},40,[649],{"type":37,"tag":77,"props":650,"children":651},{},[652],{"type":42,"value":653},"        resource.UpdateOptions{Subresource: \"status\"},\n",{"type":37,"tag":77,"props":655,"children":657},{"class":79,"line":656},41,[658],{"type":37,"tag":77,"props":659,"children":660},{},[661],{"type":42,"value":662},"    )\n",{"type":37,"tag":77,"props":664,"children":666},{"class":79,"line":665},42,[667],{"type":37,"tag":77,"props":668,"children":669},{},[670],{"type":42,"value":671},"    return operator.ReconcileResult{}, err\n",{"type":37,"tag":77,"props":673,"children":675},{"class":79,"line":674},43,[676],{"type":37,"tag":77,"props":677,"children":678},{},[679],{"type":42,"value":347},{"type":37,"tag":45,"props":681,"children":682},{},[683,689,691,697,699,705,706,712,713,719],{"type":37,"tag":73,"props":684,"children":686},{"className":685},[],[687],{"type":42,"value":688},"ReconcileAction",{"type":42,"value":690}," values: ",{"type":37,"tag":73,"props":692,"children":694},{"className":693},[],[695],{"type":42,"value":696},"ReconcileActionCreated",{"type":42,"value":698},", ",{"type":37,"tag":73,"props":700,"children":702},{"className":701},[],[703],{"type":42,"value":704},"ReconcileActionUpdated",{"type":42,"value":698},{"type":37,"tag":73,"props":707,"children":709},{"className":708},[],[710],{"type":42,"value":711},"ReconcileActionDeleted",{"type":42,"value":698},{"type":37,"tag":73,"props":714,"children":716},{"className":715},[],[717],{"type":42,"value":718},"ReconcileActionResynced",{"type":42,"value":720},".",{"type":37,"tag":45,"props":722,"children":723},{},[724],{"type":42,"value":725},"To requeue after a delay (e.g. polling an external system):",{"type":37,"tag":65,"props":727,"children":729},{"className":310,"code":728,"language":193,"meta":70,"style":70},"return operator.ReconcileResult{RequeueAfter: 10 * time.Second}, nil\n",[730],{"type":37,"tag":73,"props":731,"children":732},{"__ignoreMap":70},[733],{"type":37,"tag":77,"props":734,"children":735},{"class":79,"line":80},[736],{"type":37,"tag":77,"props":737,"children":738},{},[739],{"type":42,"value":728},{"type":37,"tag":51,"props":741,"children":743},{"id":742},"status-updates-with-resourceupdateobject",[744,746],{"type":42,"value":745},"Status updates with ",{"type":37,"tag":73,"props":747,"children":749},{"className":748},[],[750],{"type":42,"value":751},"resource.UpdateObject",{"type":37,"tag":45,"props":753,"children":754},{},[755,757,762,764,770],{"type":42,"value":756},"Always use ",{"type":37,"tag":73,"props":758,"children":760},{"className":759},[],[761],{"type":42,"value":751},{"type":42,"value":763}," for status writes — it fetches the latest version before applying your update function, avoiding ",{"type":37,"tag":73,"props":765,"children":767},{"className":766},[],[768],{"type":42,"value":769},"409 Conflict",{"type":42,"value":771}," errors when multiple reconcile events race:",{"type":37,"tag":65,"props":773,"children":775},{"className":310,"code":774,"language":193,"meta":70,"style":70},"_, err := resource.UpdateObject(ctx, r.client, identifier,\n    func(obj *v1alpha1.MyKind, exists bool) (*v1alpha1.MyKind, error) {\n        obj.Status.LastObservedGeneration = obj.GetGeneration()\n        obj.Status.State = \"Ready\"\n        obj.Status.Message = \"\"\n        return obj, nil\n    },\n    resource.UpdateOptions{Subresource: \"status\"},\n)\n",[776],{"type":37,"tag":73,"props":777,"children":778},{"__ignoreMap":70},[779,787,795,803,811,819,827,835,843],{"type":37,"tag":77,"props":780,"children":781},{"class":79,"line":80},[782],{"type":37,"tag":77,"props":783,"children":784},{},[785],{"type":42,"value":786},"_, err := resource.UpdateObject(ctx, r.client, identifier,\n",{"type":37,"tag":77,"props":788,"children":789},{"class":79,"line":90},[790],{"type":37,"tag":77,"props":791,"children":792},{},[793],{"type":42,"value":794},"    func(obj *v1alpha1.MyKind, exists bool) (*v1alpha1.MyKind, error) {\n",{"type":37,"tag":77,"props":796,"children":797},{"class":79,"line":121},[798],{"type":37,"tag":77,"props":799,"children":800},{},[801],{"type":42,"value":802},"        obj.Status.LastObservedGeneration = obj.GetGeneration()\n",{"type":37,"tag":77,"props":804,"children":805},{"class":79,"line":131},[806],{"type":37,"tag":77,"props":807,"children":808},{},[809],{"type":42,"value":810},"        obj.Status.State = \"Ready\"\n",{"type":37,"tag":77,"props":812,"children":813},{"class":79,"line":140},[814],{"type":37,"tag":77,"props":815,"children":816},{},[817],{"type":42,"value":818},"        obj.Status.Message = \"\"\n",{"type":37,"tag":77,"props":820,"children":821},{"class":79,"line":148},[822],{"type":37,"tag":77,"props":823,"children":824},{},[825],{"type":42,"value":826},"        return obj, nil\n",{"type":37,"tag":77,"props":828,"children":829},{"class":79,"line":157},[830],{"type":37,"tag":77,"props":831,"children":832},{},[833],{"type":42,"value":834},"    },\n",{"type":37,"tag":77,"props":836,"children":837},{"class":79,"line":165},[838],{"type":37,"tag":77,"props":839,"children":840},{},[841],{"type":42,"value":842},"    resource.UpdateOptions{Subresource: \"status\"},\n",{"type":37,"tag":77,"props":844,"children":845},{"class":79,"line":174},[846],{"type":37,"tag":77,"props":847,"children":848},{},[849],{"type":42,"value":850},")\n",{"type":37,"tag":45,"props":852,"children":853},{},[854,856,862,864,870],{"type":42,"value":855},"Do ",{"type":37,"tag":857,"props":858,"children":859},"strong",{},[860],{"type":42,"value":861},"not",{"type":42,"value":863}," use ",{"type":37,"tag":73,"props":865,"children":867},{"className":866},[],[868],{"type":42,"value":869},"client.Update",{"type":42,"value":871}," for status — it sends the full object and races with spec changes made by users.",{"type":37,"tag":51,"props":873,"children":875},{"id":874},"generation-based-skip",[876],{"type":42,"value":877},"Generation-based skip",{"type":37,"tag":45,"props":879,"children":880},{},[881,882,888],{"type":42,"value":241},{"type":37,"tag":73,"props":883,"children":885},{"className":884},[],[886],{"type":42,"value":887},"LastObservedGeneration",{"type":42,"value":889}," at the top of the reconcile function to avoid re-processing unchanged resources:",{"type":37,"tag":65,"props":891,"children":893},{"className":310,"code":892,"language":193,"meta":70,"style":70},"if obj.GetGeneration() == obj.Status.LastObservedGeneration {\n    return operator.ReconcileResult{}, nil\n}\n",[894],{"type":37,"tag":73,"props":895,"children":896},{"__ignoreMap":70},[897,905,913],{"type":37,"tag":77,"props":898,"children":899},{"class":79,"line":80},[900],{"type":37,"tag":77,"props":901,"children":902},{},[903],{"type":42,"value":904},"if obj.GetGeneration() == obj.Status.LastObservedGeneration {\n",{"type":37,"tag":77,"props":906,"children":907},{"class":79,"line":90},[908],{"type":37,"tag":77,"props":909,"children":910},{},[911],{"type":42,"value":912},"    return operator.ReconcileResult{}, nil\n",{"type":37,"tag":77,"props":914,"children":915},{"class":79,"line":121},[916],{"type":37,"tag":77,"props":917,"children":918},{},[919],{"type":42,"value":347},{"type":37,"tag":51,"props":921,"children":923},{"id":922},"reconcileoptions",[924],{"type":37,"tag":73,"props":925,"children":927},{"className":926},[],[928],{"type":42,"value":929},"ReconcileOptions",{"type":37,"tag":45,"props":931,"children":932},{},[933,935,941,943,949],{"type":42,"value":934},"Control informer behavior via ",{"type":37,"tag":73,"props":936,"children":938},{"className":937},[],[939],{"type":42,"value":940},"BasicReconcileOptions",{"type":42,"value":942}," on the ",{"type":37,"tag":73,"props":944,"children":946},{"className":945},[],[947],{"type":42,"value":948},"AppManagedKind",{"type":42,"value":950}," entry:",{"type":37,"tag":65,"props":952,"children":954},{"className":310,"code":953,"language":193,"meta":70,"style":70},"{\n    Kind:       mykindv1alpha1.MyKindKind(),\n    Reconciler: reconciler,\n    ReconcileOptions: simple.BasicReconcileOptions{\n        Namespace:      \"my-namespace\",          \u002F\u002F watch one namespace; default is all\n        LabelFilters:   []string{\"env=prod\"},    \u002F\u002F only reconcile matching resources\n        FieldSelectors: []string{\"status.phase=Running\"},\n        UsePlain:       false,                   \u002F\u002F false = wrap in OpinionatedReconciler (default; manages finalizers)\n    },\n},\n",[955],{"type":37,"tag":73,"props":956,"children":957},{"__ignoreMap":70},[958,966,974,982,990,998,1006,1014,1022,1029],{"type":37,"tag":77,"props":959,"children":960},{"class":79,"line":80},[961],{"type":37,"tag":77,"props":962,"children":963},{},[964],{"type":42,"value":965},"{\n",{"type":37,"tag":77,"props":967,"children":968},{"class":79,"line":90},[969],{"type":37,"tag":77,"props":970,"children":971},{},[972],{"type":42,"value":973},"    Kind:       mykindv1alpha1.MyKindKind(),\n",{"type":37,"tag":77,"props":975,"children":976},{"class":79,"line":121},[977],{"type":37,"tag":77,"props":978,"children":979},{},[980],{"type":42,"value":981},"    Reconciler: reconciler,\n",{"type":37,"tag":77,"props":983,"children":984},{"class":79,"line":131},[985],{"type":37,"tag":77,"props":986,"children":987},{},[988],{"type":42,"value":989},"    ReconcileOptions: simple.BasicReconcileOptions{\n",{"type":37,"tag":77,"props":991,"children":992},{"class":79,"line":140},[993],{"type":37,"tag":77,"props":994,"children":995},{},[996],{"type":42,"value":997},"        Namespace:      \"my-namespace\",          \u002F\u002F watch one namespace; default is all\n",{"type":37,"tag":77,"props":999,"children":1000},{"class":79,"line":148},[1001],{"type":37,"tag":77,"props":1002,"children":1003},{},[1004],{"type":42,"value":1005},"        LabelFilters:   []string{\"env=prod\"},    \u002F\u002F only reconcile matching resources\n",{"type":37,"tag":77,"props":1007,"children":1008},{"class":79,"line":157},[1009],{"type":37,"tag":77,"props":1010,"children":1011},{},[1012],{"type":42,"value":1013},"        FieldSelectors: []string{\"status.phase=Running\"},\n",{"type":37,"tag":77,"props":1015,"children":1016},{"class":79,"line":165},[1017],{"type":37,"tag":77,"props":1018,"children":1019},{},[1020],{"type":42,"value":1021},"        UsePlain:       false,                   \u002F\u002F false = wrap in OpinionatedReconciler (default; manages finalizers)\n",{"type":37,"tag":77,"props":1023,"children":1024},{"class":79,"line":174},[1025],{"type":37,"tag":77,"props":1026,"children":1027},{},[1028],{"type":42,"value":834},{"type":37,"tag":77,"props":1030,"children":1031},{"class":79,"line":187},[1032],{"type":37,"tag":77,"props":1033,"children":1034},{},[1035],{"type":42,"value":1036},"},\n",{"type":37,"tag":45,"props":1038,"children":1039},{},[1040,1046,1048,1054],{"type":37,"tag":73,"props":1041,"children":1043},{"className":1042},[],[1044],{"type":42,"value":1045},"UsePlain: false",{"type":42,"value":1047}," (the default) wraps your reconciler in ",{"type":37,"tag":73,"props":1049,"children":1051},{"className":1050},[],[1052],{"type":42,"value":1053},"OpinionatedReconciler",{"type":42,"value":1055},", which manages finalizers automatically so the SDK can guarantee clean deletion.",{"type":37,"tag":51,"props":1057,"children":1059},{"id":1058},"references",[1060],{"type":42,"value":1061},"References",{"type":37,"tag":233,"props":1063,"children":1064},{},[1065,1088,1117],{"type":37,"tag":237,"props":1066,"children":1067},{},[1068,1078,1080,1086],{"type":37,"tag":1069,"props":1070,"children":1072},"a",{"href":1071},"references\u002Fwatchers.md",[1073],{"type":37,"tag":73,"props":1074,"children":1076},{"className":1075},[],[1077],{"type":42,"value":1071},{"type":42,"value":1079}," — ",{"type":37,"tag":73,"props":1081,"children":1083},{"className":1082},[],[1084],{"type":42,"value":1085},"Watcher",{"type":42,"value":1087}," alternative (event-style Add\u002FUpdate\u002FDelete callbacks) + decision matrix for watcher vs reconciler",{"type":37,"tag":237,"props":1089,"children":1090},{},[1091,1100,1101,1107,1109,1115],{"type":37,"tag":1069,"props":1092,"children":1094},{"href":1093},"references\u002Funmanaged-kinds.md",[1095],{"type":37,"tag":73,"props":1096,"children":1098},{"className":1097},[],[1099],{"type":42,"value":1093},{"type":42,"value":1079},{"type":37,"tag":73,"props":1102,"children":1104},{"className":1103},[],[1105],{"type":42,"value":1106},"UnmanagedKinds",{"type":42,"value":1108}," for reconciling resources your app doesn't own, with ",{"type":37,"tag":73,"props":1110,"children":1112},{"className":1111},[],[1113],{"type":42,"value":1114},"UseOpinionated: false",{"type":42,"value":1116}," guidance and common failure modes",{"type":37,"tag":237,"props":1118,"children":1119},{},[1120,1129,1131,1137,1139,1145],{"type":37,"tag":1069,"props":1121,"children":1123},{"href":1122},"references\u002Fregistration.md",[1124],{"type":37,"tag":73,"props":1125,"children":1127},{"className":1126},[],[1128],{"type":42,"value":1122},{"type":42,"value":1130}," — full ",{"type":37,"tag":73,"props":1132,"children":1134},{"className":1133},[],[1135],{"type":42,"value":1136},"app.go",{"type":42,"value":1138}," wiring (client setup, multi-version registration, ",{"type":37,"tag":73,"props":1140,"children":1142},{"className":1141},[],[1143],{"type":42,"value":1144},"ValidateManifest",{"type":42,"value":1146},") + common failure modes",{"type":37,"tag":51,"props":1148,"children":1150},{"id":1149},"external-resources",[1151],{"type":42,"value":1152},"External resources",{"type":37,"tag":233,"props":1154,"children":1155},{},[1156,1167],{"type":37,"tag":237,"props":1157,"children":1158},{},[1159],{"type":37,"tag":1069,"props":1160,"children":1164},{"href":1161,"rel":1162},"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fgrafana-app-sdk",[1163],"nofollow",[1165],{"type":42,"value":1166},"grafana-app-sdk GitHub",{"type":37,"tag":237,"props":1168,"children":1169},{},[1170],{"type":37,"tag":1069,"props":1171,"children":1174},{"href":1172,"rel":1173},"https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fgrafana\u002Fgrafana-app-sdk\u002Foperator",[1163],[1175],{"type":42,"value":1176},"operator package docs",{"type":37,"tag":1178,"props":1179,"children":1180},"style",{},[1181],{"type":42,"value":1182},"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":1184,"total":1297},[1185,1202,1219,1233,1250,1266,1284],{"slug":1186,"name":1186,"fn":1187,"description":1188,"org":1189,"tags":1190,"stars":20,"repoUrl":21,"updatedAt":1201},"adaptive-metrics","optimize Grafana Cloud metrics costs","Cut Grafana Cloud Metrics cost by shrinking active-series count with Adaptive Metrics aggregation rules — auto-recommendations from query history, custom exact\u002Fregex rules, label-drop config, unused-metric detection, and Alloy remote_write fallback. Use when investigating a high Mimir\u002FGrafana Cloud bill, hunting high-cardinality labels (`pod_uid`, `service_instance_id`, `version`), pre-aggregating counters\u002Fgauges, dropping unused metrics, or measuring `grafanacloud_instance_active_series` before\u002Fafter — even when the user says \"reduce cardinality\", \"too many series\", \"metrics spend\", \"active series count is exploding\", or \"drop the version label\" without naming Adaptive Metrics.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1191,1194,1195,1198],{"name":1192,"slug":1193,"type":15},"Cost Optimization","cost-optimization",{"name":9,"slug":8,"type":15},{"name":1196,"slug":1197,"type":15},"Metrics","metrics",{"name":1199,"slug":1200,"type":15},"Observability","observability","2026-07-12T07:44:27.451068",{"slug":1203,"name":1203,"fn":1204,"description":1205,"org":1206,"tags":1207,"stars":20,"repoUrl":21,"updatedAt":1218},"admin","manage Grafana Cloud accounts and RBAC","Manage Grafana Cloud accounts — organizations, stacks, RBAC roles and assignments, SSO\u002FSAML\u002FOAuth\u002FGitHub auth, service accounts for CI\u002FCD, user invites, team membership, and API-driven provisioning. Creates stacks via the Cloud API, mints service-account tokens, applies role assignments, configures SSO providers, and provisions teams\u002Ffolders\u002Fdashboards via Terraform. Use when managing Grafana Cloud access, configuring SSO\u002FSAML\u002FOAuth, setting up service accounts for Terraform\u002FCI\u002FCD, assigning RBAC roles, inviting users, managing multiple stacks or organizations, provisioning cloud resources via API or Terraform, or auditing admin actions — even when the user says \"set up SSO\", \"create a stack\", \"make a service account\", or \"onboard a team\" without explicitly saying \"admin\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1208,1211,1214,1215],{"name":1209,"slug":1210,"type":15},"Access Control","access-control",{"name":1212,"slug":1213,"type":15},"Auth","auth",{"name":9,"slug":8,"type":15},{"name":1216,"slug":1217,"type":15},"Operations","operations","2026-07-12T07:44:12.078436",{"slug":1220,"name":1220,"fn":1221,"description":1222,"org":1223,"tags":1224,"stars":20,"repoUrl":21,"updatedAt":1232},"admission-control","implement admission control webhooks","Use when the user asks to \"write a validator\", \"add validation\", \"implement admission control\", \"write a mutating webhook\", \"add a mutation handler\", \"validate incoming resources\", \"implement admission logic\", \"add admission webhooks\", \"write ingress validation\", or asks how to validate or mutate resources before they are persisted in a grafana-app-sdk app. Provides guidance on implementing validation and mutation admission handlers for grafana-app-sdk apps.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1225,1226,1229],{"name":13,"slug":14,"type":15},{"name":1227,"slug":1228,"type":15},"Security","security",{"name":1230,"slug":1231,"type":15},"Validation","validation","2026-07-12T07:45:06.148973",{"slug":1234,"name":1234,"fn":1235,"description":1236,"org":1237,"tags":1238,"stars":20,"repoUrl":21,"updatedAt":1249},"alerting-irm","configure Grafana Alerting and Incident Management","Configure Grafana Alerting, Incident Response Management (IRM), and SLOs end-to-end — provisions Grafana-managed and data-source-managed alert rules, contact points (Slack\u002FPagerDuty\u002Femail\u002Fwebhook), notification policies with hierarchical matchers, silences, mute timings, on-call schedules and escalation chains, incident-management integrations, and SLOs with multi-window burn-rate alerts. Use when configuring alerts, debugging notification routing, setting up on-call rotations, declaring or managing incidents, defining SLOs, provisioning alerting via YAML or API, picking matchers for a notification policy, building a PagerDuty\u002FSlack webhook receiver, or troubleshooting why an alert isn't firing — even when the user says \"page me on errors\", \"alert me when X happens\", \"route this to the platform team\", or \"set up an SLO\" without naming Alerting or IRM.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1239,1242,1243,1246],{"name":1240,"slug":1241,"type":15},"Alerting","alerting",{"name":9,"slug":8,"type":15},{"name":1244,"slug":1245,"type":15},"Incident Response","incident-response",{"name":1247,"slug":1248,"type":15},"Monitoring","monitoring","2026-07-12T07:44:02.393397",{"slug":1251,"name":1251,"fn":1252,"description":1253,"org":1254,"tags":1255,"stars":20,"repoUrl":21,"updatedAt":1265},"alloy","build unified telemetry pipelines with Grafana Alloy","Build a unified telemetry pipeline with Grafana Alloy — one OpenTelemetry-compatible binary that collects metrics, logs, traces, and profiles and ships to Grafana Cloud \u002F Prometheus \u002F Loki \u002F Tempo \u002F Pyroscope. Covers the Alloy config language (blocks, `sys.env`, component refs), `prometheus.scrape` → `remote_write`, `loki.source.file` + `loki.process` → `loki.write`, `otelcol.receiver.otlp` → `otelcol.exporter.otlp`, `pyroscope.scrape`, K8s \u002F Docker \u002F EC2 discovery, relabeling, modules (`import.file\u002Fgit\u002Fhttp`), clustering, Fleet Management `remotecfg`, the Alloy UI at `:12345`, and `alloy fmt` \u002F `alloy validate`. Use when writing a `config.alloy`, replacing Grafana Agent \u002F OTel Collector, scraping K8s pods, parsing logs, ingesting OTLP, or debugging \"Alloy isn't sending anything\" — even when the user says \"set up the agent\", \"write me a scrape config\", \"drop these logs before sending\", or \"OTel collector config\" without naming Alloy.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1256,1257,1260,1261,1262],{"name":9,"slug":8,"type":15},{"name":1258,"slug":1259,"type":15},"Logs","logs",{"name":1196,"slug":1197,"type":15},{"name":1199,"slug":1200,"type":15},{"name":1263,"slug":1264,"type":15},"OpenTelemetry","opentelemetry","2026-07-12T07:43:54.817139",{"slug":1267,"name":1267,"fn":1268,"description":1269,"org":1270,"tags":1271,"stars":20,"repoUrl":21,"updatedAt":1283},"app-observability","monitor application performance in Grafana Cloud","Get RED metrics + service maps + frontend RUM + AI\u002FLLM monitoring out of Grafana Cloud — Application Observability (`traces_spanmetrics_*` from OTel traces, p50\u002Fp95\u002Fp99 latency, exemplar-to-trace, traces-to-logs \u002F profiles), Frontend Observability with the Faro Web SDK (Core Web Vitals, session replay, `pushError`, React + router integration, `TracingInstrumentation` for browser → backend trace correlation), and AI Observability via OpenLIT (token \u002F cost \u002F latency, GPU, hallucination + toxicity evals). Use when standing up APM for a service, wiring an Alloy OTLP receiver + forwarding to Cloud, instrumenting a React frontend for RUM, debugging why service-map edges are missing, monitoring LLM cost drift, or correlating a frontend error to its backend trace — even when the user says \"set up APM\", \"show service map\", \"monitor browser perf\", \"session replay\", \"RUM SDK\", or \"watch our OpenAI bill\" without naming App \u002F Frontend \u002F AI Observability.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1272,1275,1278,1279,1282],{"name":1273,"slug":1274,"type":15},"APM","apm",{"name":1276,"slug":1277,"type":15},"Distributed Tracing","distributed-tracing",{"name":9,"slug":8,"type":15},{"name":1280,"slug":1281,"type":15},"LLM","llm",{"name":1199,"slug":1200,"type":15},"2026-07-12T07:44:34.500406",{"slug":1285,"name":1285,"fn":1286,"description":1287,"org":1288,"tags":1289,"stars":20,"repoUrl":21,"updatedAt":1296},"app-sdk-concepts","scaffold and configure Grafana apps","Use when starting any grafana-app-sdk work — scaffolding a Grafana app, initializing a Grafana App Platform app, picking a deployment mode (standalone operator \u002F grafana\u002Fapps \u002F frontend-only), wiring app-specific config, or onboarding to the SDK. Covers `grafana-app-sdk` CLI install, `project init` per deployment mode, project layout, the schema-centric workflow (CUE kinds → generated code → reconciler\u002Fadmission logic), and `SpecificConfig` for env-driven app configuration. Use even if the user just says \"make a new app\", \"Grafana app platform\", \"kinds and watchers\", \"operator scaffold\", or asks about `apps\u002F` inside the Grafana repo, without naming the SDK explicitly.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1290,1291,1294,1295],{"name":13,"slug":14,"type":15},{"name":1292,"slug":1293,"type":15},"Deployment","deployment",{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},"2026-07-12T07:45:08.595757",48,{"items":1299,"total":1479},[1300,1315,1334,1354,1369,1383,1396,1411,1428,1441,1454,1467],{"slug":1301,"name":1301,"fn":1302,"description":1303,"org":1304,"tags":1305,"stars":1312,"repoUrl":1313,"updatedAt":1314},"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},[1306,1307,1310,1311],{"name":1276,"slug":1277,"type":15},{"name":1308,"slug":1309,"type":15},"Frontend","frontend",{"name":1247,"slug":1248,"type":15},{"name":1199,"slug":1200,"type":15},1103,"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Ffaro-web-sdk","2026-07-12T07:43:24.63314",{"slug":1316,"name":1316,"fn":1317,"description":1318,"org":1319,"tags":1320,"stars":1331,"repoUrl":1332,"updatedAt":1333},"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},[1321,1324,1327,1330],{"name":1322,"slug":1323,"type":15},"API Development","api-development",{"name":1325,"slug":1326,"type":15},"Authentication","authentication",{"name":1328,"slug":1329,"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":1335,"name":1335,"fn":1336,"description":1337,"org":1338,"tags":1339,"stars":1331,"repoUrl":1332,"updatedAt":1353},"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},[1340,1343,1346,1347,1350],{"name":1341,"slug":1342,"type":15},"CSV","csv",{"name":1344,"slug":1345,"type":15},"Data Analysis","data-analysis",{"name":9,"slug":8,"type":15},{"name":1348,"slug":1349,"type":15},"GraphQL","graphql",{"name":1351,"slug":1352,"type":15},"JSON","json","2026-07-15T05:34:05.773947",{"slug":1355,"name":1355,"fn":1356,"description":1357,"org":1358,"tags":1359,"stars":1366,"repoUrl":1367,"updatedAt":1368},"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},[1360,1363,1364,1365],{"name":1361,"slug":1362,"type":15},"Agents","agents",{"name":9,"slug":8,"type":15},{"name":1247,"slug":1248,"type":15},{"name":1199,"slug":1200,"type":15},430,"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fgcx","2026-07-25T05:30:40.29622",{"slug":1370,"name":1370,"fn":1371,"description":1372,"org":1373,"tags":1374,"stars":1366,"repoUrl":1367,"updatedAt":1382},"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},[1375,1376,1377,1380,1381],{"name":1361,"slug":1362,"type":15},{"name":9,"slug":8,"type":15},{"name":1378,"slug":1379,"type":15},"Instrumentation","instrumentation",{"name":1280,"slug":1281,"type":15},{"name":1199,"slug":1200,"type":15},"2026-07-31T05:53:52.580237",{"slug":1384,"name":1384,"fn":1385,"description":1386,"org":1387,"tags":1388,"stars":1366,"repoUrl":1367,"updatedAt":1395},"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},[1389,1390,1393,1394],{"name":1361,"slug":1362,"type":15},{"name":1391,"slug":1392,"type":15},"Evals","evals",{"name":9,"slug":8,"type":15},{"name":1199,"slug":1200,"type":15},"2026-07-31T05:53:53.576347",{"slug":1397,"name":1397,"fn":1398,"description":1399,"org":1400,"tags":1401,"stars":1366,"repoUrl":1367,"updatedAt":1410},"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},[1402,1403,1404,1407],{"name":1361,"slug":1362,"type":15},{"name":9,"slug":8,"type":15},{"name":1405,"slug":1406,"type":15},"QA","qa",{"name":1408,"slug":1409,"type":15},"Testing","testing","2026-07-31T05:53:51.62785",{"slug":1412,"name":1412,"fn":1413,"description":1414,"org":1415,"tags":1416,"stars":1366,"repoUrl":1367,"updatedAt":1427},"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},[1417,1420,1423,1426],{"name":1418,"slug":1419,"type":15},"Dashboards","dashboards",{"name":1421,"slug":1422,"type":15},"Data Visualization","data-visualization",{"name":1424,"slug":1425,"type":15},"Design","design",{"name":9,"slug":8,"type":15},"2026-07-25T05:30:46.289717",{"slug":1429,"name":1429,"fn":1430,"description":1431,"org":1432,"tags":1433,"stars":1366,"repoUrl":1367,"updatedAt":1440},"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},[1434,1437,1438,1439],{"name":1435,"slug":1436,"type":15},"Debugging","debugging",{"name":9,"slug":8,"type":15},{"name":1244,"slug":1245,"type":15},{"name":1199,"slug":1200,"type":15},"2026-07-18T05:11:10.445428",{"slug":1442,"name":1442,"fn":1443,"description":1444,"org":1445,"tags":1446,"stars":1366,"repoUrl":1367,"updatedAt":1453},"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},[1447,1448,1449,1452],{"name":1435,"slug":1436,"type":15},{"name":9,"slug":8,"type":15},{"name":1450,"slug":1451,"type":15},"Graph Analysis","graph-analysis",{"name":1199,"slug":1200,"type":15},"2026-07-25T05:30:39.380934",{"slug":1455,"name":1455,"fn":1456,"description":1457,"org":1458,"tags":1459,"stars":1366,"repoUrl":1367,"updatedAt":1466},"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},[1460,1463,1464,1465],{"name":1461,"slug":1462,"type":15},"CLI","cli",{"name":9,"slug":8,"type":15},{"name":1247,"slug":1248,"type":15},{"name":1216,"slug":1217,"type":15},"2026-07-31T05:53:50.587304",{"slug":1468,"name":1468,"fn":1469,"description":1470,"org":1471,"tags":1472,"stars":1366,"repoUrl":1367,"updatedAt":1478},"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},[1473,1474,1475],{"name":1461,"slug":1462,"type":15},{"name":9,"slug":8,"type":15},{"name":1476,"slug":1477,"type":15},"Presentations","presentations","2026-07-25T05:30:45.282458",80]