Skip to content

Instantly share code, notes, and snippets.

---
description: '"pro" command — open the GitHub Pull Request Overview in VS Code'
globs:
alwaysApply: false
---
## "pro" — Pull Request Overview
When the user says **"pro"**, open the GitHub Pull Requests extension's PR overview page (the description/overview tab) for the specified PR.
@smith
smith / workflows-not-tasks.md
Created March 4, 2026 17:58
Workflows, Not Tasks: Rethinking Elastic's Background Execution Architecture

Workflows, Not Tasks: Rethinking Elastic's Background Execution Architecture

2026-03-04 — Nathan Smith, Tech Lead, APM @ Elastic Observability


The Problem

Kibana Task Manager is an application-level job queue embedded in a UI server. It is simultaneously the scheduler, the claimer, and the executor — all inside a Node.js process that also serves HTTP requests. These concerns can't scale independently, and the polling-based claim model generates wasted load on Elasticsearch at scale.

@smith
smith / job-queue-architecture-discussion.md
Created March 4, 2026 16:58
Background job architecture for Elastic — discussion notes (2026-03-04)

Background Job Architecture for Elastic — Discussion Notes

2026-03-04 — Starting from @platformatic/job-queue, ending at first principles


1. @platformatic/job-queue — What Is It?

Matteo Collina (Node.js TSC, Fastify creator) and Platformatic shipped a new job queue library for Node.js with a clean pluggable storage interface:

---
description: Code review workflow — triggered by "let's do code review", "review", or "review <number/URL>"
globs:
alwaysApply: false
---
## Code Review Process
When the user says "let's do code review", "review", or similar:
@smith
smith / kibana-sre-session-start.mdc
Created February 20, 2026 14:32
Kibana SRE session start agent rule
---
description: Auto-sync Kibana repo with upstream and bootstrap on session start
globs:
alwaysApply: true
---
When the user starts a new session in the Kibana workspace (`/Users/smith/Code/kibana`) with a greeting or "kibana-sre" prompt:
1. **Sync with upstream**: `git fetch upstream main && git merge --ff-only upstream/main`
2. **Push to origin**: `git push origin main` (only if on main)
@smith
smith / session-2026-02-19-observability-es-clients.md
Created February 20, 2026 04:48
Observability ES Client Usage Report — Kibana audit of which apps use which Elasticsearch client abstractions

Session — 2026-02-19

Summary

Audited all Elasticsearch client usage across x-pack/solutions/observability/ in Kibana. Produced a comprehensive report showing which observability apps use which ES client abstractions (direct ElasticsearchClient, custom wrappers, IScopedClusterClient) and where the key client factories/types are defined.


Request: Find all ES client imports in observability and report which apps use which clients

@smith
smith / edot-components.yml
Created May 21, 2025 18:05
`otelcol components`: upstream vs edot
# ~/Desktop/elastic-agent-9.0.1-darwin-aarch64/otelcol components
buildinfo:
command: /Users/smith/Desktop/elastic-agent-9.0.1-darwin-aarch64/elastic-agent
description: Elastic opentelemetry-collector distribution
version: 9.0.1
receivers:
- name: filebeatreceiver
stability:
logs: Alpha
@smith
smith / semconv.json
Created May 5, 2025 05:18
Semantic conventions data representations
[
{
"id": "registry.android.deprecated",
"type": "attribute_group",
"display_name": "Deprecated Android Attributes",
"brief": "This document defines attributes that represents an occurrence of a lifecycle transition on the Android platform.\n",
"attributes": [
"android.state"
]
},
const fs = require("fs");
const path = require("path");
const yaml = require("js-yaml");
function extractEntitiesAndRelationships(baseDir) {
const entities = [];
function processFile(filePath) {
const fileContent = fs.readFileSync(filePath, "utf8");
const data = yaml.load(fileContent);
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.