Home / Companies / Graphite / Blog / Post Details
Content Deep Dive

Call site attribution: how to pinpoint rogue SQL queries throttling your performance

Blog post from Graphite

Post Details
Company
Date Published
Author
Type
Word Count
1,086
Company Posts That Month
101
Language
English
Hacker News Points
-
Post removed?
No
Summary

As data usage and traffic are expected to increase tenfold, a Node.js web app faced potential performance bottlenecks due to SQL query loads, prompting a need for optimization to handle the anticipated surge. Call site attribution was implemented to address this issue, allowing developers to trace SQL queries back to their source code for efficient identification and resolution of performance bottlenecks. Initial solutions using Datadog and monkey patching were deemed too costly or ineffective, leading to the adoption of a call site tagging system, which tags SQL queries with user-defined strings indicating their origin. This approach enhanced query traceability and system legibility without incurring additional costs, although it faced implementation challenges with the TypeORM library, which only partially supported query tagging. By wrapping TypeORM calls and using a query builder for tagging, nearly all queries were covered, allowing developers to identify and optimize problematic areas in the codebase effectively. This strategic implementation of call site tagging has positioned the app to manage its expected growth, ensuring ongoing optimization as user traffic continues to scale.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Observability 3 2,534 521 146 +9%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.