Ocelot/docs/features/tracing.rst
Tom Pallister 9f1fb002c1
Feature/#246 (#252)
* failing test

* failing test but needs real butterfly server running..need to fix that...also worked out ive broken tracing...yey

* brought in butterfly source code so i can work out how to write acceptance tests for this...

* fixed the bug but still need to fix tracing

* tracing working again across services but need to make tracing hook into new Ocelot middleware as it still uses asp.net middleware

* removed butterfly libs brought in for testing
2018-03-01 12:58:36 +00:00

31 lines
868 B
ReStructuredText

Tracing
=======
Ocelot providers tracing functionality from the excellent `Butterfly <https://github.com/ButterflyAPM>`_ 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()
.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.