--我想这可能是一个说明性的例子，让你看看 ‫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
以前的演示都是基于--tag，six，我现在创建了这个 ‫previous demos were all based on ‫tag, six, I've now created this
另一个版本称为SIX ICDHARDASH，没有头传播。如果 ‫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
文件名为应用程序，五个应用程序，没有Istio点yaml。 ‫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
开始新文件，您可能知道iktukubernetes将会终止 ‫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
等待kubectl PL给找到的原始资源。然后我 ‫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
Atto无标头传播。再一次，我什么也没做 ‫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
记录的时间是1956年，根据我的电脑时钟。和 ‫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
-我选择的服务是web应用程序。所以重复 ‫that I selected the service to ‫be the web app. So repeating the
之前的演示，我将切换到web应用程序 ‫demo from previously, I'll ‫switch across to the web app
-现在。我会点击这些车辆中的任何一辆，伦敦 ‫now. And I'll click on any of ‫these vehicles, London
对我来说，把原始人换成耶格UI，我不会做的 ‫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
我们从web应用程序开始的原始服务。我们也是 ‫originating service we started ‫from the web app. We're also
-看到API网关。好吧，让我们开门见山，你可以 ‫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
应用程序到API网关。就像先前三个被看见三个 ‫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
上一个视频，API的数据不会结束 ‫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
在描摹中。所以我们知道API网关确实调用了 ‫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
追踪，我可以把这里的记录转换成API ‫tracing, I could switch the ‫service here to be the API
然后下到底，点击查找痕迹。 ‫gateway, and then go down to the ‫bottom and click find traces.
-现在我得到了20个痕迹中的一个。 ‫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
触发对API的调用。所以我有所有的 ‫triggering calls to the API ‫gateway. So I've got all of
--这20条痕迹。我知道，这些痕迹中可能有一个是 ‫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
正如我多次说过的，Istio的主要特点是 ‫great features of Istio, as I've ‫said many times is that most of
我们从Istio得到的东西绝对不需要对 ‫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.