Editorial question109.6K views4,667 votes0 answers3,356 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