-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Feat/groundwork for zipkin #3842
Conversation
82666cf
to
f9137bc
Compare
ebbc696
to
4830d28
Compare
359f24b
to
2241fbd
Compare
kong/pdk/request.lua
Outdated
-- -- Given a request to https://example.com:1234/v1/movies?movie=foo | ||
-- | ||
-- kong.request.get_path_and_querystring() -- "/v1/movies?movie=foo" | ||
function _REQUEST.get_path_and_querystring() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left comment about the name here:
#3859 (review)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleted
2241fbd
to
9f2a159
Compare
I am not sure if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleted
9f2a159
to
5aa253b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
When the path + querystring is needed, this prevents having to manually check wether the querystring is present and concatenating the path + "?" + the query string every time. Needed for the zipkin plugin.
This came out while reviewing the zipkin plugin. I was not able to reproduce the problem in our tests. It certainly does not hurt to have the extra `or ""` anyway
5aa253b
to
5ef4583
Compare
When the path + querystring is needed, this prevents having to manually check wether the querystring is present and concatenating the path + "?" + the query string every time. From #3842 Signed-off-by: Thibault Charbonnier <[email protected]>
This came out while reviewing the zipkin plugin. I was not able to reproduce the problem in our tests. It certainly does not hurt to have the extra `or ""` anyway. From #3842 Signed-off-by: Thibault Charbonnier <[email protected]>
Merged to next with adjustments; except for the timing API commit |
This PR adds a couple features to the PDK:
kong.request.get_start_time()
, which wrapsngx.req.start_time()
kong.request.get_raw_path_and_query()
It also fix a (possible?) problem when ngx.request_uri is nil.
It is needed for the zipkin update: Kong/kong-plugin-zipkin#24