pg-yang commented on code in PR #12108:
URL: https://github.com/apache/skywalking/pull/12108#discussion_r1566876489
##########
oap-server/server-starter/src/main/resources/ui-initialized-templates/apisix/apisix-service.json:
##########
@@ -424,23 +424,23 @@
],
"expressionsConfig": [
{
- "unit": "req / s",
+ "unit": "req / s (per node)",
Review Comment:
Oops, they're different, I carefully consider these two expressions.
`meter_apisix_sv_http_status_matched{code='503'}` means querying all metrics
with 503 like the data below:
```
time-1:
{node=192.169.0.1,code=503} 12
{node=192.169.0.2,code=503} 13
time-2:
{node=192.169.0.1,code=503} 14
{node=192.169.0.2,code=503} 15
time-3:
{node=192.169.0.1,code=503} 16
{node=192.169.0.2,code=503} 17
```
`aggregate_labels(meter_apisix_sv_http_status_matched{code='503'},sum(code))`
will get
```
time-1:
{code=503} 12+13
time-2:
{code=503} 14+15
time-3:
{code=503} 16+17
```
`avg(aggregate_labels(meter_apisix_sv_http_status_matched{code='503'},sum(code)))`
will get
```
# A service with two nodes sent data for three times
(12+13+14+15)/3
```
`avg(meter_apisix_sv_http_status_matched{code='503'})` means
```
# The result means the average times of 503 occurred from all nodes in one
second,
(12+13+14+15)/6
```
Thanks for your help, I will change the expression soon.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]