NodeJS Instrumentation - Creating Custom Spans for Method-Level Visibility | Datadog Tips & Tricks
In part 2 of this 4 part series, you’ll learn how to instrument your NodeJS application to capture custom method-level spans, allowing visibility into how specific methods behave in your application.
To try this out for free for 14 days, sign up at: https://dtdg.co/tips
Flame graphs allow for deep insight into the performance of your code. During instrumentation, we can capture custom spans for deeper layers of visibility in the resulting flame graphs. In this video, we use instrumentation to capture a method-level span, allowing us to see the performance of that specific method in our flame graphs in the Datadog UI.
By capturing additional spans, we can get insight into the methods that we are particularly concerned with—for example, looping methods or methods making database calls. We can then pinpoint when that method may be the cause of unacceptable latency or a target for optimization.