mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-22 06:22:50 +08:00
updated docs for tracing
This commit is contained in:
parent
7c62b55431
commit
947a1450d0
@ -61,7 +61,8 @@ Here is an example ReRoute configuration, You don't need to set all of these thi
|
|||||||
},
|
},
|
||||||
"HttpHandlerOptions": {
|
"HttpHandlerOptions": {
|
||||||
"AllowAutoRedirect": true,
|
"AllowAutoRedirect": true,
|
||||||
"UseCookieContainer": true
|
"UseCookieContainer": true,
|
||||||
|
"UseTracing": true
|
||||||
},
|
},
|
||||||
"UseServiceDiscovery": false
|
"UseServiceDiscovery": false
|
||||||
}
|
}
|
||||||
|
31
docs/features/tracing.rst
Normal file
31
docs/features/tracing.rst
Normal file
@ -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.
|
@ -30,6 +30,7 @@ Thanks for taking a look at the Ocelot documentation. Please use the left hand n
|
|||||||
features/headerstransformation
|
features/headerstransformation
|
||||||
features/claimstransformation
|
features/claimstransformation
|
||||||
features/logging
|
features/logging
|
||||||
|
features/tracing
|
||||||
features/requestid
|
features/requestid
|
||||||
features/middlewareinjection
|
features/middlewareinjection
|
||||||
features/loadbalancer
|
features/loadbalancer
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"DownstreamHostAndPorts": [
|
"DownstreamHostAndPorts": [
|
||||||
{
|
{
|
||||||
"Host": "localhost",
|
"Host": "localhost",
|
||||||
"Port": 5002
|
"Port": 5001
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"HttpHandlerOptions": {
|
"HttpHandlerOptions": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user