Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Transaction Tracing Helps Developers Optimize Code as They Write It

DZone's Guide to

Transaction Tracing Helps Developers Optimize Code as They Write It

With transaction tracing tools, developers can continually be looking for performance problems in their code as part of their natural development process.

· Performance Zone ·
Free Resource

Learn how error monitoring with Sentry closes the gap between the product team and your customers. With Sentry, you can focus on what you do best: building and scaling software that makes your users’ lives better.

The best time for developers to optimize their code is while they are writing it. Developers can leverage the detailed transaction tracing available from APM-type tools like Prefix as a fast feedback loop to understand what their code is doing and how long it takes. Prefix works as an ASP.NET profiler and also works with several common JVMs for Java.

Transaction Tracing Is a Critical Feedback Loop

“When informed about a problem whilst in the moment, I’m in a much better position to make corrections or come up with alternative solutions. Without a quick feedback loop, the passing of time makes it difficult to get into the initial mindset which caused the problem to begin with.” —  Vince Panuccio

Lightweight code profilers and other data collect methodologies can be used to provide developers a wealth of information about what their code is doing — including logging statements, errors, SQL queries, web services, and other dependencies.

Today’s applications are complex and typically connect to multiple dependencies like SQL and NoSQL databases, PaaS services, MongoDB, Elasticsearch, Redis, queueing, and many other services. Prefix helps developers instantly understand if their code is using them correctly and how they impact the performance of their app.

transaction-tracing-prefix

Example transaction tracing captured by Prefix.

As an example, developers can find common problems like N+1 database query patterns caused by SQL queries being run in a loop. Prefix’s built-in suggestions highlight a potential problem — and the 38 database queries become a glaring problem.

stackify-prefix-n-plus-1

This instant feedback can help developers validate that their code is doing what they expected it to do. Profiling and performance tuning is something developers don’t typically do until the tail end of a project. Most of the time, they don’t even do it unless there is a known performance issue in the code or they are doing stress testing.

By using tools like Prefix, developers can continually be looking for performance problems in their code as part of their natural development process. The transaction tracing that developers can get from these types of free tools is a must have.

What’s the best way to boost the efficiency of your product team and ship with confidence? Check out this ebook to learn how Sentry's real-time error monitoring helps developers stay in their workflow to fix bugs before the user even knows there’s a problem.

Topics:
transaction tracing ,optimization ,critical feedback loop ,performance

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}