Agent skill · software engineering · metabase
add-tracing
Add OpenTelemetry tracing spans to Clojure code following Metabase tracing conventions. Use when instrumenting backend code with trace coverage.
Why this skill is useful
Provides specific patterns and conventions for adding OpenTelemetry tracing spans in Clojure, which the AI wouldn't reliably generate on its own.
What it needs
About 7k tokens when loaded. Last updated 2026-08-07. 48,568 stars on the source repository.
What this skill does
Add Tracing Spans to Clojure Code This skill helps you add OpenTelemetry (OTel) tracing spans to the Metabase backend codebase using the custom tracing/with-span macro. Reference Files src/metabase/tracing/core.clj - with-span macro, group registry, SDK lifecycle, best-effort-sanitize-sql, Pyroscope integration src/metabase/task/impl.clj - defjob macro that wraps Quartz jobs with root spans .clj-kondo/config/modules/config.edn - Module boundary configuration Module Architecture The tracing module has a deliberately minimal API surface. Only 2 namespaces are public (listed in :api in the module config): Namespace Role Status --- --- --- tracing.core Primary API: with-span, groups, SDK lifecycle, Pyroscope, MDC, best-effort-sanitize-sql Public API tracing.init Side-effect loader for quartz and settings Public API (init convention) tracing.attributes best-effort-sanitize-sql implementation (re-exported via tracing.core) Internal tracing.settings Setting definitions (MBTRACING env vars) Internal tracing.quartz Quartz JDBC proxy + JobListener Internal Rules: Only require [metabase.tracing.core :as tracing] from outside the module. tracing/best-effort-sanitize-sql and all other public functions are available from this single namespace. Do not add new API namespaces. Add new public functions to tracing.core instead. Do not require internal namespaces (tracing.attributes, tracing.settings, tracing.quartz) from outside the module. :uses :any on the core module does NOT bypass the target module's :api check — internal namespaces are still enforced. Cyclic Dependency Avoidance tracing/core.clj is required by many modules across the codebase. It must NOT compile-time require tracing.settings, as this creates transitive cyclic load dependencies (e.g., settings/core -> tracing/settings -> tracing/core -> events/impl -> events/core). …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills metabase/add-tracing