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

bug: In radixtree_host_uri mode, the prometheus plugin cannot obtain the correct matched_uri value. #5077

Closed
Donghui0 opened this issue Sep 16, 2021 · 1 comment · Fixed by #5104
Labels
bug Something isn't working checking check first if this issue occurred

Comments

@Donghui0
Copy link
Contributor

Issue description

In radixtree_host_uri mode. api_ctx.curr_req_matched._path was eventually replaced by host_rev

example:
request: http://123.com/x1 api_ctx.curr_req_matched._path replaced by moc.321

Environment

  • apisix version (cmd: apisix version): v2.9
  • OS (cmd: uname -a): centos7
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V): 1.19.3.1

Steps to reproduce

1: adjustment mode, change to radixtree_host_uri
2: request apisix route
3: query apisx:9091/apisx/promethues/metrics.

Actual result

host reverse.
example:
request: http://123.com/x1 api_ctx.curr_req_matched._path replaced by moc.321

Error log

none

Expected result

api_ctx.curr_req_matched._path replaced by matched_ops.uri

@tzssangglass tzssangglass added the checking check first if this issue occurred label Sep 16, 2021
@spacewander spacewander added the bug Something isn't working label Sep 17, 2021
@spacewander
Copy link
Member

Need to reset curr_req_matched._path after matched.
Would you provide a fix?

@spacewander spacewander added good first issue Good for newcomers and removed good first issue Good for newcomers labels Sep 17, 2021
spacewander added a commit to spacewander/incubator-apisix that referenced this issue Sep 19, 2021
Fix apache#5077

Signed-off-by: spacewander <spacewanderlzx@gmail.com>
spacewander added a commit that referenced this issue Sep 21, 2021
Fix #5077

Signed-off-by: spacewander <spacewanderlzx@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working checking check first if this issue occurred
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants