Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

instrumentation

Skill by macro-inc

Adds OpenTelemetry tracing to new user flows, cross-service calls, queue jobs and latency-sensitive code in the macro-inc codebase. Written for developers who need connected traces in Tempo or Datadog.

  • Score 80
  • 6.6k stars
  • AGPL-3.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install instrumentation

Built from the published package, never by AI.

git clone --depth 1 https://github.com/macro-inc/macro /tmp/macro && mkdir -p ~/.claude/skills && cp -r /tmp/macro/.agents/skills/instrumentation ~/.claude/skills/instrumentation

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install instrumentation in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The instrumentation skill adds OpenTelemetry tracing to new flows and hot paths in the macro-inc codebase, on the frontend and in the backend. It asks the assistant to sketch the trace shape before writing code, with one root span per user action, a child span for each phase, and the entity id on the root. It covers the @macro-inc/observability facade in the browser and Cloudflare Workers, view loading with usePending and TraceFlow, Rust service tracing, Kafka and agent message propagation, and the sampling classes that decide what reaches Datadog.

It is written for developers building user-facing flows, cross-service calls, queue or background jobs, or code on a latency-sensitive path in that repository. The source says new flows and hot paths should ship instrumented in the same change, and it links to the repository's observability rule and walkthrough.

Written from the project's SKILL.md and checked against it.

What it can do

  • Trace shape planningSketches one root span per user action with child spans for each phase before coding.
  • Frontend spansUses the observability facade for phase spans, span attributes and outbound trace headers.
  • View loading flowsTracks loading with usePending, TraceFlow and flow task spans in browser views.
  • Worker instrumentationWraps Cloudflare Workers handlers with instrument() and adopts the incoming traceparent.
  • Rust tracingAdds tracing::instrument on domain operations and outbound adapters in Rust services.
  • Kafka trace propagationInjects trace headers on Kafka publish and opens consumer spans on the receiving side.
  • Sampling decisionsExplains when to use perf sampling classes and when to leave spans unclassed.

What you need

  • Access to the macro-inc repository and its packages/observability facade
  • Datadog or Tempo to view the resulting traces

Try asking

  • Add tracing to this new upload flow, including the backend call and queue job.
  • Why is this trace in Datadog disconnected from the frontend span?
  • Instrument this Rust domain function with tracing and record the document id.

Good to know

  • Written for the macro-inc codebase, and its file paths and sampling rates refer to that project's own setup.
  • Frontend code must use the observability facade and must not import OpenTelemetry directly.
  • Sampling rates such as 5% for perf are set in the app's sampling file.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .agents/skills/instrumentation/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md14 KB

Alternatives to instrumentation

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

instrumentation: common questions

When does a span reach Datadog?

Spans are exported only once the global gate is open. Unclassed spans are always exported after that, while perf-classed spans follow the sampling rate for the user's cohort.

Do Rust services sample spans themselves?

No. Rust services and workers follow the sampled flag of the incoming traceparent and export the rest.

What is a view flow in the frontend?

A flow is a span that stays open while anything under it is loading. It ends one paint after the last hold releases.

How do I install instrumentation?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is instrumentation free?

The code is published under the AGPL-3.0 licence. The service it connects to may have its own pricing.

Is instrumentation safe to use?

It scores 80 of 100. Grades: maintenance A, licence C, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to instrumentation?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

instrumentation Install

Add to stack

Loading.