From 4b0ea4bc3bb09ccd968e5aeecfe8d20c558724bc Mon Sep 17 00:00:00 2001 From: TomPallister Date: Sun, 6 Nov 2016 12:17:09 +0000 Subject: [PATCH] Updated manual test config and readme --- README.md | 7 +++---- test/Ocelot.ManualTest/configuration.json | 8 +++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3a31d383..e88693aa 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/test/Ocelot.ManualTest/configuration.json b/test/Ocelot.ManualTest/configuration.json index 0caf2943..d39b2d71 100644 --- a/test/Ocelot.ManualTest/configuration.json +++ b/test/Ocelot.ManualTest/configuration.json @@ -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" + } } \ No newline at end of file