Skip to content

Add paid-query latency histogram to analytics API #89

Description

@emrekayat

Why this matters

SCF reviewers and investors care whether paid queries are usable in practice, not only whether payment succeeds. A small latency histogram makes provider performance visible without adding a full observability stack.

Scope

Extend analytics output with latency buckets for paid query execution:

  • <1s;
  • 1-3s;
  • 3-10s;
  • >10s;
  • unknown when latency was not recorded.

Suggested files:

  • apps/api/src/routes/public.ts
  • apps/api/src/lib/persistence.ts
  • packages/shared/src/schemas.ts

Acceptance criteria

  • Analytics API returns latency bucket counts without breaking existing fields.
  • Empty storage returns zeroed buckets.
  • Unknown/missing latency is counted separately.
  • Test covers at least empty, fast, slow, and unknown records.
  • No provider execution or payment behavior changes.

Wave complexity

High - adds investor-grade performance evidence for paid-query reliability.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssue proposed for the Drips Stellar Wave programarea: apiAPI servicearea: dataPersistence and analyticscomplexity: highExpected high implementation complexitydrips-candidateCandidate for a Drips Stellar WaveenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions