instrument-metric
Instrument Metric
Wire up the track() call an FME metric needs, then verify the event is actually arriving — don't declare success on code changes alone. Key = the same key getTreatment uses (attribution fact); value units must match the metric's format (ms vs s, dollars vs cents) — a wrong unit gives silently wrong results. Related: /create-metric creates metrics; /choose-metric recommends which metrics to use.
Tools
Works through the Harness MCP server or the Harness CLI; names are from tool-map.md.
| Operation | MCP | CLI |
|---|---|---|
| Get metric | harness_get · fme_metric · params: { metric_id } |
harness get metric <id> --json |
| Get event type | harness_get · fme_event_type · params: { event_type_id } |
harness get event_type <event-name> --json |
Instructions
Phase 1: Establish scope
See scope-establishment.md. Confirm the Harness organization and project before any get operation, separately from the local application repository and intended runtime environment. Never derive Harness scope from the repo name. If application source or runtime access is unavailable, stop at guidance and label implementation/delivery unverified — CLI/MCP access does not grant application access.