feat: query metrics extension, retry utility, and DTO input sanitization - #380
Merged
Merged
Conversation
…#368 conflicts) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012xRrTYwEy2y8yow4o8iUQ8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Conflict-free resolution of PR #368 changes onto current main.
Changes
New files:
src/database/query-metrics.extension.ts— Prisma extension that logs slow queries aboveslowQueryThresholdMssrc/database/query-metrics.extension.spec.ts— tests for the metrics extensionsrc/utils/retry.util.ts—retryWithBackoffusingexponentialBackoffWithJittersrc/utils/retry.util.spec.ts— comprehensive retry utility testssrc/common/validators/text-field.sanitizer.ts—sanitizeTextField(collapse/trim whitespace)src/common/validators/text-field.sanitizer.spec.ts— tests for text field sanitizersrc/modules/organizations/organization.dto.spec.ts— tests for organization Zod schemasModified files:
src/config/database.config.ts— addslowQueryThresholdMstoDatabaseConfigsrc/config/env.validation.ts— addDATABASE_SLOW_QUERY_THRESHOLD_MSenv var (default 1000ms)src/database/prisma.service.ts— chaincreateQueryMetricsExtensionbeforecreateQueryTimeoutExtensionsrc/database/prisma.service.spec.ts— chainable$extendsmock +slowQueryThresholdMs: 1000src/queues/dlq.processor.ts— wrapdomainEvents.createwithretryWithBackoffsrc/queues/dlq.processor.spec.ts— add two retry test casessrc/integrations/stellar/horizon-stellar.client.ts— wraploadAccount/getTransactioncalls withretryWithBackoffsrc/modules/organizations/organization.dto.ts— add.strict()andsanitizeTextFieldtransforms to all schemas🤖 Generated with Claude Code
https://claude.ai/code/session_012xRrTYwEy2y8yow4o8iUQ8
Generated by Claude Code