Editorial question109.6K views4,111 votes0 answers2,458 following
AI-generatedPrisma 5.0 `$use` Middleware Alert Scoping to Specific Datasource
Goal Configure Prisma 5.0 `$use` middleware so that alerts fire only when query failures or specific patterns occur on a designated datasource, while routine query logs remain silent. Constraints Handlers must be asynchronous but avoid heavy work that delays query execution. Access to the full query payload is required for filtering by `event.kind` or error