原文地址:https://www.cnblogs.com/loogn/p/9007847.html

Ocelot使用一个杰出的项目Butterfly 提供了跟踪功能。

为了使用跟踪,请阅读Butterfly的文档。

在Ocelot中如果你想跟踪一个ReRoute,你需要做如下事情:

在ConfigureServices方法中

services
    .AddOcelot()
    .AddOpenTracing(option =>
    {
        //this is the url that the butterfly collector server is running on...
        option.CollectorUrl = "http://localhost:9618";
        option.Service = "Ocelot";
    });

然后在ocelot.json文件中,添加如下配置到你想要跟随的ReRoute中。

"HttpHandlerOptions": {
      "UseTracing": true
  },

现在,当这个ReRoute被调用的时候,Ocelot会发生跟踪信息到Butterfly。

相关文章:

  • 2021-08-20
  • 2021-07-24
  • 2021-12-24
  • 2022-03-06
  • 2021-07-10
  • 2021-12-16
  • 2021-07-02
  • 2021-05-21
猜你喜欢
  • 2021-07-26
  • 2021-10-30
  • 2022-02-07
  • 2021-12-06
  • 2022-01-17
  • 2021-10-25
  • 2022-01-31
相关资源
相似解决方案