metrics-instrumentation
Skill by comet-ml
Specifies how to add operational OpenTelemetry metrics to a workflow in apps/opik-backend. It covers per-stage counters and native histograms, labelled per workspace. It is for backend engineers who need per-stage visibility into pipelines such as scoring, ingestion, experiments or jobs.
Install metrics-instrumentation
Built from the published package, never by AI.
git clone --depth 1 https://github.com/comet-ml/opik /tmp/opik && mkdir -p ~/.claude/skills && cp -r /tmp/opik/.agents/skills/metrics-instrumentation ~/.claude/skills/metrics-instrumentationRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install metrics-instrumentation in Claude Code
git clone --depth 1 https://github.com/comet-ml/opik /tmp/opik && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/opik/.agents/skills/metrics-instrumentation ~/.gemini/antigravity-cli/skills/metrics-instrumentationAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install metrics-instrumentation in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill is a normative specification for adding operational OpenTelemetry metrics to a workflow in apps/opik-backend. It explains how to decompose a workflow into stages, and which instrument answers which question: counters for events, native histograms for latency and size distributions, and gauges or UpDownCounters for levels that rise and fall. It also sets rules for labels such as workspace_id, workspace_name, stage type and error_type, and shows Java examples built on GlobalOpenTelemetry and reactive request context. Online scoring is used as the worked example.
The skill covers metric emission only. Building a Grafana dashboard from these metrics is a separate skill, and PostHog product events fall under analytics-instrumentation. It is aimed at backend engineers and coding assistants working on scoring, ingestion, experiments or jobs in the Opik backend. It asks them to run mvn compile with spotless passing before delivery.
Written from the project's SKILL.md and checked against it.
What it can do
- Stage decompositionBreaks a workflow into ordered stages with input, output, failure mode and existing instrumentation.
- Instrument selectionGuides the choice between counters, native histograms, gauges and UpDownCounters for each question.
- Per-workspace labelsAdds workspace_id and workspace_name labels with a fallback when the name is absent.
- Error countersDefines error counters dimensioned by error_type and by the component where the error occurred.
- Queue time and latencyKeeps queue delay separate from processing time and defines end-to-end latency.
- Saturation gaugesDescribes in-flight and JVM heap gauges that show a pipeline nearing a ceiling.
- Payload size metricsDescribes byte and size counters and histograms broken down by content type and workspace.
- Reactive instrumentationShows how to read workspace context with deferContextual and avoid detached subscriptions.
- Test guidanceExplains how to stub reactive methods that now return a lazy Mono<Void> in existing tests.
What you need
- Access to the apps/opik-backend codebase
- Java with Maven (mvn -o compile)
- Spotless formatting check passing
- OpenTelemetry API as used by the backend
Try asking
- Add per-stage OpenTelemetry metrics to our scoring pipeline in opik-backend
- Which metric type should I use for queue delay in this workflow?
- Show how to label enqueue metrics with workspace_id and workspace_name
Good to know
- Covers metric emission only, not the Grafana dashboard
- Does not cover PostHog product analytics events
- Requires the opik-backend conventions and repository layout to be present
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/metrics-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 metrics-instrumentation
All alternatives →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.
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.
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.
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.
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.
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.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
metrics-instrumentation: common questions
Does this skill build Grafana dashboards?
No. The source says building the Grafana dashboard from these metrics is a separate skill. This one covers only what to emit.
Which metric types does it cover?
It covers counters for events, native histograms for latency and size distributions, gauges for levels, and UpDownCounters for signed in-flight levels.
How is it different from analytics-instrumentation?
The source says analytics-instrumentation covers PostHog product events. This skill covers operational OpenTelemetry metrics for backend pipelines.
How do I install metrics-instrumentation?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is metrics-instrumentation free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is metrics-instrumentation safe to use?
It scores 89 of 100. Grades: maintenance A, licence A, 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 metrics-instrumentation?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
