Skip to content

Add metrics for indexer decode failures #51

Description

@priscaenoch

Problem

indexer/src/decoder.js falls back to a function name of "unknown" and emits raw_topics when it cannot recognize an event or its ABI. This fallback is silent: there is no counter or log that records how often decoding falls through, so there is no way to measure decoding coverage or detect a regression where a whole class of events stops decoding. Since human-readable decoding is the core value of the product, this blind spot matters.

What needs to be done

  • Increment a metric each time the decoder falls back to the unknown/raw_topics path, labeled by contract and/or event where feasible.
  • Emit a debug/structured log for fallbacks so they can be sampled and investigated.
  • Expose the metric via the service's metrics endpoint so decoding coverage can be tracked over time.
  • Document what a rising fallback rate indicates.

Files

  • indexer/src/decoder.js
  • indexer metrics/exposition and indexer/src/api.js

Acceptance deliverables

  • Decode fallbacks are counted and observable.
  • A rising fallback rate is visible via metrics.
  • All CI checks pass; the change cannot be merged until CI is green.

Tests to pass

  • Test: decoding an unrecognized event increments the fallback counter.
  • Test: decoding a known event does not increment it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third CampaignenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions