Learn how to implement tracing in a NestJS application to view where time is being spent in your applications & debug slow APIs.
Length 14:09
Captions English (Generated), Spanish (Auto-translated), French (Auto-translated), Korean (Auto-translated), Portuguese (Auto-translated), Vietnamese (Auto-translated) #nestjs #opentelemetry #tracing #debugging #node.js #jaeger #honeycomb #observability #web development
0:00 Hey everyone. Today I want to show you how we can 0:03 implement tracing in 0:04 a NestJS or really any Node.js application, 0:08 which is gonna allow us to see where time is actually being spent 0:12 on our incoming HTTP requests in our express server. 0:16 So with tracing enabled, we can easily debug performance issues 0:20 with our 0:20 application running both locally and in production. 0:24 Let's go ahead and see how we can get started. 0:26 So let's go ahead and use the Nest CLI to generate 0:30 new project. I'll call this NestJS 0:34 tracing, 0:35 and I'll use pnpm as my package manager. 0:38 Let's CD into the directory, and I'll open it 0:42 up in my code editor. So we have our default Nest 0:46 application here listening on port three thousand. 0:50 Let's go ahead and start up our development server 0:56 using pnpm start dev. 0:59 I've also opened up Postman so we can launch a get request at our server 1:03 and see we have a response of Hello World coming back thanks to 1:07 our default app controller. That's simply exposing 1:11 a single get route and the Hello World string. 1:15 So our server's up and running. Let's go ahead and see how we can set up 1:18 tracing now so that we can trace HTTP requests coming 1:22 into this route and see where time is actually being spent. 1:26 To do this, we're gonna need to install a number of 1:29 packages. 1:30 So to make this easier for you, I'm going to leave the command 1:34 that we're about to enter to install all of these packages in the 1:39 lecture notes below. Simply copy this command to get all the 1:43 packages we're gonna need. All right, so these are all the packages we're gonna 1:46 need to support tracing in our Node.js 1:50 application. So these are all coming from OpenTelemetry, 1:53 as you can
The rest of the transcript is for members.
Sign in