mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-23 00:32:50 +08:00
Updated manual test config and readme
This commit is contained in:
parent
ff5776613f
commit
4b0ea4bc3b
@ -270,10 +270,11 @@ to true for logging settings. Nicely onto the next feature.
|
||||
Ocelot supports a client sending a request id in the form of a header. If set Ocelot will
|
||||
use the requestid for logging as soon as it becomes available in the middleware pipeline.
|
||||
Ocelot will also forward the request id with the specified header to the downstream service.
|
||||
I'm not sure if have this spot on yet in terms of the pipeline order becasue there are a few
|
||||
I'm not sure if have this spot on yet in terms of the pipeline order becasue there are a few logs
|
||||
that don't get the users request id at the moment and ocelot just logs not set for request id
|
||||
which sucks. You can still get the framework request id in the logs if you set
|
||||
IncludeScopes true in your logging config.
|
||||
IncludeScopes true in your logging config. This can then be used to match up later logs that do
|
||||
have an OcelotRequestId.
|
||||
|
||||
In order to use the requestid feature in your ReRoute configuration add this setting
|
||||
|
||||
@ -325,8 +326,6 @@ forwarded to the downstream service. Obviously this would break everything :(
|
||||
and doesnt check the response is OK. I think the fact you can even call stuff
|
||||
that isnt available is annoying. Let alone it be null.
|
||||
|
||||
+ The Ocelot Request Id starts getting logged too late in the pipeline.
|
||||
|
||||
## Coming up
|
||||
|
||||
You can see what we are working on [here](https://github.com/TomPallister/Ocelot/projects/1)
|
||||
|
@ -41,8 +41,7 @@
|
||||
"DownstreamTemplate": "http://jsonplaceholder.typicode.com/posts",
|
||||
"UpstreamTemplate": "/posts",
|
||||
"UpstreamHttpMethod": "Get",
|
||||
"FileCacheOptions": { "TtlSeconds": 15 },
|
||||
"RequestIdKey": "OcRequestId"
|
||||
"FileCacheOptions": { "TtlSeconds": 15 }
|
||||
},
|
||||
{
|
||||
"DownstreamTemplate": "http://jsonplaceholder.typicode.com/posts/{postId}",
|
||||
@ -79,5 +78,8 @@
|
||||
"UpstreamTemplate": "/posts/{postId}",
|
||||
"UpstreamHttpMethod": "Delete"
|
||||
}
|
||||
]
|
||||
],
|
||||
"GlobalConfiguration": {
|
||||
"RequestIdKey": "OcRequestId"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user