Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging: Added target host on logging policy. #1116

Merged
merged 3 commits into from
Sep 16, 2019

Conversation

eloycoto
Copy link
Contributor

This commit add the way to get the target host on logging policy without
getting request headers.

Signed-off-by: Eloy Coto [email protected]

Related to #1082

@eloycoto eloycoto requested a review from a team as a code owner September 13, 2019 09:42
@@ -77,6 +77,7 @@ local function get_request_context(context)
}

ctx.service = context.service or {}
ctx.service.host = context.host
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this modifies the host attr for the service meaning that every request for that service will be affected.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This happens on log_by_lua block, so it only modifies when the request finishes, so nothing is affected no?

This commit add the way to get the original request information on
logging policy to be able to log full request information.

Related to Issue 3scale#1082

Signed-off-by: Eloy Coto <[email protected]>
Due to liquid filter was using ngx.ctx instead of the original context,
the value mismatch and a valid content can't be used.

This commit refactor the operations to always use context instead
context.request

Signed-off-by: Eloy Coto <[email protected]>
@davidor davidor merged commit 8160140 into 3scale:master Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants