From the course: DevOps Foundations: Distributed Tracing
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Adding metadata to your traces
From the course: DevOps Foundations: Distributed Tracing
Adding metadata to your traces
- [Instructor] In the next example I'll show you how we can add tags and metadata to our spans. And we'll also use a technique to reduce the spanning boilerplate code that we have to write. So let's get started. So I'll use the same global scope that we created on line 126 and again I will keep our long span as well. And now I'm going to create another span that will illustrate how we can handle an error message and nest children spans. So again I will create a span object, call this span two. Again we're going to grab a instance of our tracer. We will build a span. And this span we can name something to what the application or this part of the application may be doing so maybe process receipt. Just like in the previous example we will use the as child of command so we can connect this span to the parent. And we'll start it. Okay, so at this point we've started a new span called span two. So here we'll start with our again whether try catch blocks in case there's an error. And again…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Configuring the Jaeger tracer2m 19s
-
(Locked)
Tracing app code4m 25s
-
(Locked)
Seeing the app trace in the Jaeger UI1m 30s
-
(Locked)
Adding metadata to your traces4m 11s
-
(Locked)
Seeing the tags and error event in the Jaeger UI1m 30s
-
(Locked)
Tracing database calls4m 6s
-
(Locked)
Seeing the database traces in the Jaeger UI1m 27s
-
(Locked)
Tracing message queue calls4m 3s
-
(Locked)
Seeing the message queue traces in the Jaeger UI1m 15s
-
(Locked)
Tracing web calls server-side3m 16s
-
(Locked)
Seeing web service traces in the Jaeger UI1m 26s
-
(Locked)
Tracing web calls end-to-end4m 25s
-
(Locked)
Seeing the whole picture2m 5s
-
(Locked)
-
-