TLDR Web Dev · ARTICLES & TUTORIALS

CALL SITE ATTRIBUTION: HOW TO PINPOINT ROGUE SQL QUERIES THROTTLING DATABASE PERFORMANCE

graphite.dev4 min read

Summary from the TLDR Web Dev newsletter

This author explains how they added call site attribution to their Node.js web app to prepare for a potential 10x growth in database traffic. The attribution helped identify the specific location in the source code from which SQL queries were executed, allowing for quick identification and optimization of performance bottlenecks. Initially, they explored solutions like Datadog tracing and monkey patching, but eventually settled on requiring SQL queries to be tagged with a user-defined string indicating the call site.