Skip to content

wraith_metrics wiring into wraith-names, splitter, vault, governance #163

Description

@truthixify

Tier: M (2-4 days) | Type: feature

Context. stellar/wraith-metrics/src/lib.rs defines a v1 metric event schema (topic ("metric", contract, metric_name) + data (value, dimensions)), and stellar/METRICS.md documents standard metric names. Today only stealth-sender, stealth-registry, and stealth-batch-sender emit through it. wraith-names, stealth-splitter, stealth-vault, and the governance PoC do not emit anything, and the METRICS.md per-contract tables for those four are missing. The Grafana dashboard at stellar/scripts/metrics-indexer/grafana-dashboard.json therefore has blank panels for those contracts.

Scope.

  • Add wraith_metrics::emit_metric calls for the natural counter / volume metrics on each of the four contracts (see METRICS.md standard names): names (register_count, renew_count, release_count, resolve_hit_count, resolve_miss_count), splitter (create_count, fund_count, fund_volume, beneficiaries_per_split), vault (deposit_count, deposit_volume, claim_count, refund_count), governance (proposal_count, vote_count, execution_count).
  • Populate the four missing per-contract tables in stellar/METRICS.md.
  • Add panels to stellar/scripts/metrics-indexer/grafana-dashboard.json for the new metric names.
  • Extend the indexer at stellar/scripts/metrics-indexer/index.js to include the four new contract topic filters.

Acceptance.

  • Each of the four contracts has at least one integration test asserting on the emitted WraithMetricEvent shape
  • stellar/METRICS.md per-contract tables cover all four (no blank rows)
  • Grafana dashboard renders panels for the new metrics against a synthetic event stream
  • Optimized wasm size delta for each contract recorded in stellar/SIZE.md (metric emission adds bytes)

Files. stellar/wraith-names/src/lib.rs, stellar/stealth-splitter/src/lib.rs, stellar/stealth-vault/src/lib.rs, stellar/contracts/governance/src/lib.rs, stellar/METRICS.md, stellar/scripts/metrics-indexer/grafana-dashboard.json, stellar/scripts/metrics-indexer/index.js, stellar/SIZE.md.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programdripsFunded via Drips NetworkfeatureNew feature workhelp wantedExtra attention is neededobservabilityAuto-created for Wave 8stellarTouches Stellar / Soroban codestellar-waveAuto-created for Wave 8wave-8Auto-created for Wave 8

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions