Skip to content

Commit

Permalink
updated docs for tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Pallister authored and Tom Pallister committed Feb 13, 2018
1 parent 7c62b55 commit 947a145
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/features/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
31 changes: 31 additions & 0 deletions docs/features/tracing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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(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.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/Ocelot.ManualTest/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 5002
"Port": 5001
}
],
"HttpHandlerOptions": {
Expand Down

0 comments on commit 947a145

Please sign in to comment.