Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


I thought it might be illustrative to show you what would happen if you don't propagate these headers.

So for that reason, just off camera, I've built a new set of images for all of the microservices here.

And all I've done is I've simply gone through and deleted the propagate headers interceptor file, and then rebuilt, I'm just using an incrementing number, as I work my way through this course, the previous demos were all based on tag, six, I've now created this alternative version called six dash, no header propagation.

If you want to see this in action, you don't have to follow along here.

But if you do, then we can do a kubectl deletes on the file called applicate, five application, no Istio dot yaml.

And then I've put in a separate folder, just so it doesn't get in the way, I've got a folder in your coast course download files called no header propagation demo.

And in there is a new version of that file where I'm simply using these new images, you might be wondering why we didn't just go in and apply this new file, you probably know Kubernetes would then terminate all of the running pods and we'll start new pods.

problem with doing that is we are running very tight for space on minkube here.

And if you try that, there's a very good chance everything will lock up, because it's going to have a set of the incoming pods and the outgoing pods running at once.

And I'm fearful that might cause everything to crash.

So I'm just waiting for kubectl PL to give no resources found.

And then I can apply this new file.

And just while that's getting up and running, I'll show you that file.

Here it is in the text editor.

All I've done is I've changed the tags on the images to no header propagation.

So again, I've done nothing more here than removing that one class propagate headers interceptor from every single one of the micro services.

As always, we'll just need to wait for these new parts to start up.

So eventually, I've got my pods back up and running with these new images then, which remember are not doing the automatic header propagation.

So let's see the difference with these images.

And I'm going to repeat the demo that I did in the previous video, which if you'll remember, I went into the Jaeger UI, and I set the look back period to a custom time range.

And I'm going to set the start time and date to be the current time, which for me at the time of recording is 1956, according to my PC clock.

And you'll remember the purpose of that is if I do a fine trace now.

Oh, and yes, I also have to set the end time.

As before, I'll just set the end time to be some time tomorrow.

So anytime in the future, we'll do, we're doing nothing with the system at the moment.

And that's giving no results.

I should also mention that I selected the service to be the web app.

So repeating the demo from previously, I'll switch across to the web app now.

And I'll click on any of these vehicles, London Riverside, for me, switching back to Jaeger UI, I won't do anything other than clicking on find traces.

And as in the previous demo, we have ended up with three traces as a result of that.

But now I want to show you the big difference.

We've got that boring trace with just a single span.

But the other two traces, sadly, now only have three spans which if you remember from the previous video, we had more than three spans before.

Let's pick either of them.

And in fact, before I pick one, let's focus here on the list of services that have been visited by each request.

If you remember, previously, we had one of these traces ending up in the staff service and another of the traces ending up in I think it was a position tracker, it was something different.

And we could distinguish them immediately.

But this time around, we're only seeing two services appearing in both of them.

One of the services is the originating service we started from the web app.

We're also seeing the API gateway.

Well, let's cut to the chase, you can click on either of these.

And you're going to see that essentially you have just one hop, we're going from the web app to the API gateway.

Just as previously were three seen three spans purely because there's also the proxy from the web app showing up on the trace.

But you know, and I know from the previous video, that the API gateway isn't the end there will be another hop to at least one further upstream.

So This, and we're just not seeing it.

Now that hot did happen, the software was running absolutely fine.

But we're not seeing it here in the tracing.

So we know that the API gateway did call another service.

And it would actually be theoretically, theoretically possible to sort of manually continue the tracing, I could switch the service here to be the API gateway, and then go down to the bottom and click find traces.

And now I'm getting as a result of that 20 traces returned.

Well, the reason for that is, although I'm not actually clicking anything on the web app, of course, there is still a lot of activity going on inside the system, we are getting updates for the vehicles.

And it looks like therefore, that is triggering calls to the API gateway.

So I've got all of these 20 traces.

And I know, probably one of these traces is the trace that I'm interested in.

But how do I work out which one.

And so really, the point I'm making here is that without the automatic header propagation, this whole tracing system is very much less useful than it was mean, don't get me wrong, we can still get some information from this trace.

But it's very much truncated.

So I hope you're not too disappointed with that.

Well, I have to admit that I am because one of the great features of Istio, as I've said many times is that most of what we get from Istio requires absolutely no changes to the applications that were running on the platform.

This, however, is the exception.

If you want to get full tracing, then you do have to propagate those specific headers from service to service to service.

Now, it is entirely up to you how you do that.

But however you do it, there is going to be an invasion NCR application.

And of course, it means you have to do it everywhere.

Because if you miss it in one particular service, then you're going to have what I'm going to call broken traces.

So in this video, I just wanted to show you one technique, I realised that's only relevant if you're working on spring boots, and you happen to be using the fain libraries.

But I know a lot of you are using that.

And the joy of my solution really is that you just drop a class into your system and you don't need to change anything else.

Anyway, I've said enough about that.

I do promise that for the rest of this course, the features from Istio will be non invasive.

I'll see you in the next video.