diff --git a/docs/features/configuration.rst b/docs/features/configuration.rst index 29a19af0f..3bd4da2f2 100644 --- a/docs/features/configuration.rst +++ b/docs/features/configuration.rst @@ -61,7 +61,8 @@ Here is an example ReRoute configuration, You don't need to set all of these thi }, "HttpHandlerOptions": { "AllowAutoRedirect": true, - "UseCookieContainer": true + "UseCookieContainer": true, + "UseTracing": true }, "UseServiceDiscovery": false } diff --git a/docs/features/tracing.rst b/docs/features/tracing.rst new file mode 100644 index 000000000..a30ea7413 --- /dev/null +++ b/docs/features/tracing.rst @@ -0,0 +1,31 @@ +Tracing +======= + +Ocelot providers tracing functionality from the excellent `Butterfly `_ project. + +In order to use the tracing please read the Butterfly documentation. + +In ocelot you need to do the following if you wish to trace a ReRoute. + +In your ConfigureServices method + +.. code-block:: csharp + + services + .AddOcelot(Configuration) + .AddOpenTracing(option => + { + //this is the url that the butterfly collector server is running on... + option.CollectorUrl = "http://localhost:9618"; + option.Service = "Ocelot"; + }); + +Then in your configuration.json add the following to the ReRoute you want to trace.. + +.. code-block:: json + + "HttpHandlerOptions": { + "UseTracing": true + }, + +Ocelot will now send tracing information to Butterfly when this ReRoute is called. \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 16ce9f196..c98c21743 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -30,6 +30,7 @@ Thanks for taking a look at the Ocelot documentation. Please use the left hand n features/headerstransformation features/claimstransformation features/logging + features/tracing features/requestid features/middlewareinjection features/loadbalancer diff --git a/test/Ocelot.ManualTest/configuration.json b/test/Ocelot.ManualTest/configuration.json index d49c843f3..45f184bcf 100644 --- a/test/Ocelot.ManualTest/configuration.json +++ b/test/Ocelot.ManualTest/configuration.json @@ -8,7 +8,7 @@ "DownstreamHostAndPorts": [ { "Host": "localhost", - "Port": 5002 + "Port": 5001 } ], "HttpHandlerOptions": {