sumeng001 opened a new issue, #11233:
URL: https://github.com/apache/apisix/issues/11233

   ### Current Behavior
   
   I'm using apisix response-rewrite to change the status code to 200, but the 
code in prometheus takes the upstream value 404. so the value of 
apisix_http_status in prometheus should distinguish between upstream_code and 
code. That is, one is the code returned by upstream, and the other is the code 
returned by apisix.
   
   ### Expected Behavior
   
   _No response_
   
   ### Error Logs
   
   [07/May/2024:15:40:34 
+0800]|7921f83b9e523f23442d18a8578c5d51|0.019|10.100.250.113:19337|**200**|GET|http://ecs.example.com/fssc/02eb3863542e01fd9592400e906ce615.ico|HTTP/1.1|367|546|DIRECT/10.102.19.100:8080|application/json;charset=UTF-8|-|curl/7.19.7
 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.44 zlib/1.2.3 libidn/1.18 
libssh2/1.4.2|0.018|**404**|-|-|-|-|-|-|12880|17726|10|26832|OK|-
   200 is apisix code
   404 is upstream code
   
   ### Steps to Reproduce
   
   {
     "uri": "/",
     "name": "ecs.example.com_200",
     "methods": [
       "GET",
       "POST",
       "PUT",
       "DELETE",
       "PATCH",
       "HEAD",
       "OPTIONS",
       "CONNECT",
       "TRACE",
       "PURGE"
     ],
     "host": "ecs.example.com",
     "plugins": {
       "response-rewrite": {
         "body": " ",
         "status_code": 200
       }
     },
     "upstream_id": "1369277",
     "labels": {
       "API_VERSION": "v1"
     },
     "status": 1
   }
   
   ### Environment
   
   - APISIX version (run `apisix version`):3.2.0
   - Operating system (run `uname -a`):Linux 4.19.0-4.el7.ucloud.x86_64 #1 SMP 
Mon Dec 16 08:54:55 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):nginx 
version: openresty/1.21.4.2
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`):{"hostname":"","boot_time":1711642728,"etcd_version":"3.5.0","version":"3.2.0","id":"710905a9-e853-4305-af4e-b2fd247fcb65"}
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
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: notifications-unsubscr...@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to