Updated manual test config and readme

This commit is contained in:
TomPallister 2016-11-06 12:17:09 +00:00
parent ff5776613f
commit 4b0ea4bc3b
2 changed files with 8 additions and 7 deletions

View File

@ -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 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. 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. 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 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 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 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 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. that isnt available is annoying. Let alone it be null.
+ The Ocelot Request Id starts getting logged too late in the pipeline.
## Coming up ## Coming up
You can see what we are working on [here](https://github.com/TomPallister/Ocelot/projects/1) You can see what we are working on [here](https://github.com/TomPallister/Ocelot/projects/1)

View File

@ -41,8 +41,7 @@
"DownstreamTemplate": "http://jsonplaceholder.typicode.com/posts", "DownstreamTemplate": "http://jsonplaceholder.typicode.com/posts",
"UpstreamTemplate": "/posts", "UpstreamTemplate": "/posts",
"UpstreamHttpMethod": "Get", "UpstreamHttpMethod": "Get",
"FileCacheOptions": { "TtlSeconds": 15 }, "FileCacheOptions": { "TtlSeconds": 15 }
"RequestIdKey": "OcRequestId"
}, },
{ {
"DownstreamTemplate": "http://jsonplaceholder.typicode.com/posts/{postId}", "DownstreamTemplate": "http://jsonplaceholder.typicode.com/posts/{postId}",
@ -79,5 +78,8 @@
"UpstreamTemplate": "/posts/{postId}", "UpstreamTemplate": "/posts/{postId}",
"UpstreamHttpMethod": "Delete" "UpstreamHttpMethod": "Delete"
} }
] ],
"GlobalConfiguration": {
"RequestIdKey": "OcRequestId"
}
} }