-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feature: prometheus plugin apisix_http_status
metric route
tag Improve recognition
#1574
Comments
agreed, welcome PR for this |
When there are multiple values for uris, how does the dispatch method in the lua-resty-radixtree library return which match is successful? |
I do not think that is a good way. I think we can add a new field to store the matched |
Modify Prometheus plugin to add a new |
it depends on this feature at |
@membphis is this still open for dev? |
pls assign this to me, i will solve it on October 20. |
…prove recognition apache#1574 fix apache#1574 the code is done. todo: Modifying test cases
…prove recognition apache#1574 fix apache#1574
…prove recognition (apache#1574) fix apache#1574
Under the condition of setting
I want to init But this can lead to failure in some cases, because of the following code (https://github.com/api7/lua-resty-radixtree/blob/master/lib/resty/radixtree.lua#L456-L458),
In my case it won't return true. So this line of thinking tends to be invalid. I also considered the Now I don't have a solution, is there a way to get the specific elements in the |
you can take a look at this, it can help you: https://github.com/api7/lua-resty-radixtree#synopsis -- try to match
local opts = {
host = "foo.com",
method = "GET",
remote_addr = "127.0.0.1",
vars = ngx.var,
}
ngx.say(rx:match("/aa", opts))
-- try to match and store the cached value
local opts = {
host = "foo.com",
method = "GET",
remote_addr = "127.0.0.1",
vars = ngx.var,
matched = {}
}
ngx.say(rx:match("/name/json/foo/bar/gloo", opts))
ngx.say("name: ", opts.matched.name, " other:", opts.matched.other) |
here are more cases: https://github.com/api7/lua-resty-radixtree/search?q=matched |
I saw the example above, init
But in this test case apisix/t/node/sanity-radixtree.t Lines 127 to 133 in 71dcf36
It will cause the test to fail. The reason is the following code:
case 1: did't init
|
In like this
|
@tzssangglass welcome PR to fix this bug. if we need to https://github.com/api7/lua-resty-radixtree , welcome to create a new issue first at |
ok, i try |
…prove recognition apache#1574 fix apache#1574
Issue description
metric like this:
apisix_http_status{code="200",route="00000000000000000030",service="",node="10.30.30.35"}
The value of the route tag needs to be changed to the real route value instead of route id.
and add host field.
like this:
apisix_http_status{code="200",route="/*", host="www.apisix.com", node="10.30.30.35"}
It is more convenient to query the QPS of the specified route of the domain name
The text was updated successfully, but these errors were encountered: