Customize mappings
Trove’s Tier A metrics are the cross-harness comparison layer — a fixed, normalized schema so that “cost per turn” or “tokens this week” means the same thing whether the signal came from Claude Code, Cursor, or Aider. The five Tier A metrics are:
| Metric | Type | Key attributes |
|---|---|---|
trove.harness.events | counter | event.kind (chat.turn, tool.call, shell.exec, file.edit, session.start/end) |
trove.harness.tokens | counter | direction (input/output), model |
trove.harness.cost.usd | counter | model, cost.method (exact / estimated) |
trove.harness.turn.duration | histogram (s) | event.kind |
trove.harness.errors | counter | error.kind (rate_limit, auth, tool_failure, network, policy, unknown) |
Everything a harness emits natively (its Tier B metrics) always passes through untouched. Mappings only control how raw signals are additionally projected onto Tier A. You edit those rules on the Mappings tab.
Two kinds of rule
Section titled “Two kinds of rule”How a harness contributes to Tier A depends on its coverage type:
- Synthesis rules (
synthesize-from-native) — for native-OTel harnesses. Each rule names a native metric (for exampleclaude_code.token.usage), the Tier A metric it feeds (tokens), and an attribute map from the raw keys to Tier A keys. Trove implements these as a collector-sidetransform/metricstransformstep, so synthesis is additive and never disturbs the native metric. - Hook rules (
hook-rule) — for watcher/wrapper harnesses. Each rule matches a raw event name (for exampleafterAgentResponse) and either emits into a Tier A metric with a set of attributes, or emits nothing. Setting a rule’s emit to “nothing” is how you suppress double-counting — for example mappingbeforeSubmitPrompt → (none)and counting the turn only onafterAgentResponse.
Adjust a rule
Section titled “Adjust a rule”-
Open the Mappings tab and pick the harness you want to tune. Each harness shows its current Tier A rows.
-
Edit a row. Typical edits:
- Retarget an event. Change which
event.kinda raw event maps to (for example, classify a shell-execution event asshell.execrather thantool.call). - Stop a double-count. Set a redundant raw event’s emit to
“nothing” so only one of a before/after pair contributes a
chat.turn. - Toggle a synthesis row. Turn
synthesize-from-nativeon for the tokens or events metric so a native counter is also copied into Tier A; turn it off for a clean native-only namespace. - Disable a metric for one harness. Turn off a harness’s
cost.usdrow entirely if you don’t trust its estimate.
- Retarget an event. Change which
-
For cost, adjust the rate table if your model isn’t priced the way you pay. Add a model entry with your own per-1k input/output USD rates; Trove uses those for the matching
modelattribute when computingtrove.harness.cost.usd. Rows priced from a rate table reportcost.method = estimated; rows that carry a real cost from the harness reportcost.method = exact.
Preview the diff before applying
Section titled “Preview the diff before applying”Trove doesn’t apply mapping edits blind. Before anything reaches the running collector, you can preview exactly how your changes alter the generated pipeline.
-
Make your edits. Trove computes a live diff of the generated collector config — the new/changed
transformandmetricstransformstanzas your rules produce — so you can read precisely what will change before committing. -
Review the diff. Confirm the rules synthesize the metrics you expect and nothing you didn’t intend.
-
Apply changes. Trove validates the mapping, persists it to the single versioned
state.json, regeneratescollector.yaml, and signals the collector to reload. Expect a brief 1–3 second collector blip while the new config takes effect.
Reset to defaults
Section titled “Reset to defaults”Every harness ships with a sensible default mapping baked in. If you’ve edited yourself into a corner, you can always go back:
-
On the harness’s mapping, choose Reset to defaults.
-
Trove restores that harness’s shipped default rows, regenerates the collector config, and reloads. Your edits to other harnesses are untouched.