[译]Ocelot

原文

Ocelot是使用的Butterfly这个项目来实现这个的。

在ocelot要使用tracing, 首先得安装相应的包:

Install-Package Ocelot.Tracing.Butterfly

然后再ConfigureServices方法里面添加如下代码:

services
    .AddOcelot()
    // 下面这个扩展方法来自Ocelot.Tracing.Butterfly包
    .AddButterfly(option =>
    {
        // 这个是butterfly服务器的地址
        option.CollectorUrl = "http://localhost:9618";
        option.Service = "Ocelot";
    });

最后添加下面的配置到你想要trace的ReRoute中:

"HttpHandlerOptions": {
      "UseTracing": true
  }
原文地址:https://www.cnblogs.com/irocker/p/ocelot-tracing.html