mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-21 05:12:50 +08:00

* #296 renamed configuration.json to ocelot.json in preparation * removed things we dont need for tests * another file we dont need * removed some async we dont need * refactoring to consolidate configuration code * removed another pointless abstraction * #296 started writing merge code * #296 coming up with ideas for this config merging * #296 still hacking this idea around * #296 will now do a crappy merge on the configuration * #296 change so tests pass on windows
31 lines
861 B
ReStructuredText
31 lines
861 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 ocelot.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. |