Description — what to implement and the why/impact.
Maintaining high database performance for financial operations on Stellar requires proactive detection of slow or unindexed queries. This task implements a Prisma client extension or NestJS interceptor that logs query execution durations and emits warning logs when queries exceed defined execution time thresholds.
Context & Requirements — background, constraints, design references, edge cases; grounded in the actual repo (real files, stack, conventions).
The application uses Prisma ORM with PostgreSQL. Prisma supports client middleware and extensions that intercept $query or model operations. We need an extension or logger wrapper that measures execution time, captures query parameters safely (omitting sensitive keys), and logs warnings via the NestJS Logger when latency crosses a configurable threshold (e.g., 250ms).
Acceptance Criteria — a checklist ("- [ ] ...") of specific, testable conditions that define "done".
Implementation Guidance — likely files/modules to touch (use real paths from the repo context) and a suggested approach, without over-prescribing.
Inspect src/database where Prisma service and client instances are initialized. Integrate the extension during Prisma client setup.
Testing & Validation — how the contributor should prove it works (tests to add/run, manual checks, screenshots for UI).
Run npm test and npm run typecheck to ensure type safety across Prisma client extensions.
Submission Guidelines — must open a PR that includes "Closes #"; assignment is required before starting; follow the repo's existing style and conventions.
Wave complexity: Medium
Description — what to implement and the why/impact.
Maintaining high database performance for financial operations on Stellar requires proactive detection of slow or unindexed queries. This task implements a Prisma client extension or NestJS interceptor that logs query execution durations and emits warning logs when queries exceed defined execution time thresholds.
Context & Requirements — background, constraints, design references, edge cases; grounded in the actual repo (real files, stack, conventions).
The application uses Prisma ORM with PostgreSQL. Prisma supports client middleware and extensions that intercept
$queryor model operations. We need an extension or logger wrapper that measures execution time, captures query parameters safely (omitting sensitive keys), and logs warnings via the NestJS Logger when latency crosses a configurable threshold (e.g., 250ms).Acceptance Criteria — a checklist ("- [ ] ...") of specific, testable conditions that define "done".
Implementation Guidance — likely files/modules to touch (use real paths from the repo context) and a suggested approach, without over-prescribing.
Inspect
src/databasewhere Prisma service and client instances are initialized. Integrate the extension during Prisma client setup.Testing & Validation — how the contributor should prove it works (tests to add/run, manual checks, screenshots for UI).
Run
npm testandnpm run typecheckto ensure type safety across Prisma client extensions.Submission Guidelines — must open a PR that includes "Closes #"; assignment is required before starting; follow the repo's existing style and conventions.
Wave complexity: Medium