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] Zip King can also report errors when an exception is thrown in the code being traced. Let's add another span to our backend service. This time we'll add some metadata to the span as well. So first, we'll create a new span, we'll call it errorSpan. Again, we'll retrieve tracer, we'll call nextSpan which will create this new span under the parents code that we created. We'll give it a name. We'll call this something is wrong. Okay. Then we'll actually start this tracer. We'll again create a try catch block. So start our errorSpan. Again this will start timing all the code execution that will follow. We'll add a special tag. With a tag method, again this is arbitrary key valid pairs that we can attach to the span. So call this receipt number. Again it can be an arbitrary piece of information. And we'll just add one, two, three, four. Then I'm going to do a quick wait on the thread which will again enable us to simulate a delay in this method. This method will generate…
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 Zipkin tracer2m 29s
-
(Locked)
Tracing app code5m 24s
-
(Locked)
Seeing the app trace in the Zipkin UI2m 2s
-
(Locked)
Adding metadata to your traces2m 37s
-
(Locked)
Seeing the tags and error event in the Zipkin UI1m 44s
-
(Locked)
Tracing database calls with Zipkin2m 50s
-
(Locked)
Seeing the database traces in the Zipkin UI1m 22s
-
(Locked)
Tracing message queue calls2m 17s
-
(Locked)
Seeing the message queue traces in the Zipkin UI1m 11s
-
(Locked)
Tracing web calls server-side1m 43s
-
(Locked)
Seeing web service traces in the Zipkin UI2m 9s
-
(Locked)
Tracing web calls end-to-end3m 37s
-
(Locked)
Seeing the whole picture1m 10s
-
(Locked)
-
-
-