agentleFS
fmindfmind/dot/skills/observability/SKILL.md

observability

Skill10 starsChanged 56 days agoMITView on GitHub

Instrument Python services and agents with structured logs, traces, and metrics.

59 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use parallel-agent-orchestration, ci-cd and 6 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • itallstartedwithaideaSkill

    parallel-agent-orchestration

    Parallel Agent Orchestration is the discipline of dispatching, coordinating, and aggregating results from multiple concurrent subagents to dramatically accelerate complex tasks.

    Also in 3 projects that use this

  • JohnJBorenSkill

    ci-cd

    CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies

    Also in 8 projects that use this

  • zebbernSkill

    caching

    Caching strategies — invalidation, TTL guidelines, cache keys, cache layers, and when not to cache. Use when implementing or reviewing caching logic.

    Also in 3 projects that use this

  • terrene-foundationSkill

    architecture-decisions

    Architecture decision guides for Kailash SDK including framework selection (Core SDK vs DataFlow vs Nexus vs Kaizen), runtime selection (Async vs Sync), database selection (PostgreSQL vs SQLite), node selection, and test tier selection. Use when asking about 'which framework', 'choose framework', 'which runtime', 'which database', 'which node', 'architecture decision', 'when to use', 'Core SDK vs DataFlow', 'PostgreSQL vs SQLite', 'AsyncLocalRuntime vs LocalRuntime', or 'test tier selection'.

    Also in 3 projects that use this

  • mmondoraSkill

    finops

    Cloud cost management as an architectural discipline. Unit economics, right-sizing, GCP free tier optimization, budget alerts, serverless-first. Use when making infrastructure decisions, estimating costs, or optimizing cloud spending.

    Also in 3 projects that use this

  • cryptofish7Skill

    ci-cd-pipeline

    Analyze a repo and maintain its GitHub Actions CI/CD pipeline. Detects language, tooling, test frameworks, Docker, and deploy targets, then adds or removes workflow actions to match the project's current state. Use when the user asks to "add CI/CD", "update CI", "review pipeline", "set up GitHub Actions", "audit CI", "improve CI/CD", or any request about CI/CD pipelines, GitHub Actions workflows, or continuous integration.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 42 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use one Python telemetry stack for services and agents: structlog JSON on stdout, OpenTelemetry traces and metrics over OTLP, and trace …

    line 15
  2. Very specific:

    Configure traces and metrics: use OTEL_SERVICE_NAME, OTEL_RESOURCE_ATTRIBUTES, OTEL_EXPORTER_OTLP_ENDPOINT, and an explicit protocol.

    line 21
  3. Very specific:

    Describe agent work: use current GenAI semantic conventions.

    line 23
  4. Very specific:

    Sampling follows the parent: use parentbased_traceidratio with a measured production ratio.

    line 35
  5. Distinctive:

    Cardinality is a budget: do not put user IDs, raw URL IDs, prompts, errors, or tool arguments in metric labels.

    line 36

“Common” is measured: kept by at least 6 in 10 of the 42 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Observability

Use one Python telemetry stack for services and agents: structlog JSON on stdout, OpenTelemetry traces and metrics over OTLP, and trace context on every related log event. Standard OTLP configuration keeps the application independent of the backend.

Workflow

  1. Add only the Python packages in use: structlog, OpenTelemetry API and SDK, the OTLP exporter, and explicit instrumentation packages for the service's HTTP framework and clients; FastAPI 0.142+ instruments itself (fastapi). Lock them with uv; avoid a vendor SDK in application code.
  2. Emit structured logs: render one JSON object per line to stdout in production. Use severity, message, and time for Cloud Logging while retaining stable event names and machine-readable fields.
  3. Configure traces and metrics: use OTEL_SERVICE_NAME, OTEL_RESOURCE_ATTRIBUTES, OTEL_EXPORTER_OTLP_ENDPOINT, and an explicit protocol. Keep local development quiet by disabling export when it is not configured; an SDK's default localhost endpoint does not disable telemetry.
  4. Correlate signals: a structlog processor reads trace.get_current_span().get_span_context() and adds trace_id, span_id, logging.googleapis.com/trace, and logging.googleapis.com/spanId only when the context is valid.
  5. Describe agent work: use current GenAI semantic conventions; model calls carry gen_ai.operation.name, provider and request model, and input/output token usage; agent and tool spans carry their stable agent or tool names. Do not record prompt or completion bodies by default.
  6. Export through a collector sidecar: on Google Cloud, use the Google-built OpenTelemetry Collector as a Cloud Run sidecar. Match the exporter and receiver: grpc with http://localhost:4317, or http/protobuf with http://localhost:4318. For environment-configured instrumentation set OTEL_EXPORTER_OTLP_PROTOCOL; FastAPI's automatic export requires http/protobuf. For manually constructed Python exporters choose the matching gRPC or HTTP class. Let the collector authenticate with ADC and forward telemetry to Google Cloud.
  7. Evaluate separately: operational telemetry detects failures and drift but does not prove response quality. Link a trace ID to Langfuse or MLflow scores when used, and use agent-evaluation for repeated comparisons through the project's existing runner.
  8. Verify all three signals: send one request, locate its trace, read the correlated log events, confirm the expected metric, then exercise shutdown to prove buffered telemetry flushes within the platform grace period.
    gcloud logging read 'trace="projects/<project>/traces/<trace_id>"' --project=<project> --freshness=1h --limit=20 --format='json(timestamp,severity,textPayload,jsonPayload.message,trace,spanId)'

Gotchas

  • Bound investigation output: select incident time and correlation IDs before loading logs; include custom event fields when needed for diagnosis. A limit is a partial view, not proof of absence. Keep complete authorized captures as local artifacts and expand the query when the cause falls outside the initial window.
  • Cloud Logging keys are exact: plain level and msg are not promoted to severity and message fields.
  • Sampling follows the parent: use parentbased_traceidratio with a measured production ratio; keep 100% sampling for bounded development only.
  • Cardinality is a budget: do not put user IDs, raw URL IDs, prompts, errors, or tool arguments in metric labels.
  • Telemetry is best effort: bound exporter queues and timeouts, handle SIGTERM, and never block a user request on an unavailable collector.
  • Privacy starts before export: redact secrets and personal data in the application, because backend filters cannot retract already-exported spans or logs.

Official Skills

Upstream: langfuse/skills, mlflow/skills, pydantic/skills, and grafana/skills. Follow the shared vendor-skill policy and install only the backend selection the project uses. The Vercel plugin in openai/plugins ships an unrelated same-name observability skill; never install it beside this one. Exclude mlflow/skills' same-name agent-evaluation from any selection (name policy).

Documentation

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.