manesioz opened a new issue, #68505:
URL: https://github.com/apache/doris/issues/68505

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   ### Version
   
   master (573c93c63b88fb68ac1d318dcd3e1672dd2361e6)
   
   ### What's Wrong?
   
   In `MetricRepo`, the counter `HTTP_COUNTER_COPY_INFO_QUERY_ERR` is 
registered with the name of the upload error counter:
   
   
https://github.com/apache/doris/blob/573c93c63b88fb68ac1d318dcd3e1672dd2361e6/fe/fe-core/src/main/java/org/apache/doris/metric/MetricRepo.java#L834-L842
   
   ```java
   HTTP_COUNTER_COPY_INFO_UPLOAD_ERR = new 
LongCounterMetric("http_copy_into_upload_err_total",
           MetricUnit.REQUESTS, "http copy into upload err request");
   ...
   HTTP_COUNTER_COPY_INFO_QUERY_ERR = new 
LongCounterMetric("http_copy_into_upload_err_total",
           MetricUnit.REQUESTS, "http copy into err query request");
   ```
   
   As a result, the FE `/metrics` endpoint exports two 
`doris_fe_http_copy_into_upload_err_total` series with the same name and the 
same labels. One series is the upload error count and the other is the query 
error count. Monitoring systems cannot tell them apart, and Prometheus treats 
them as duplicate samples.
   
   `CopyIntoAction` increments `HTTP_COUNTER_COPY_INFO_QUERY_ERR` only on the 
query path, so the counter is correct but its name is wrong.
   
   ### What You Expected?
   
   The query error counter is exported as 
`doris_fe_http_copy_into_query_err_total`, which matches the naming of the 
other three copy-into counters (`http_copy_into_upload_request_total`, 
`http_copy_into_upload_err_total`, `http_copy_into_query_request_total`).
   
   ### How to Reproduce?
   
   1. Start an FE.
   2. Run `curl http://<fe_host>:<http_port>/metrics | grep http_copy_into`.
   3. `doris_fe_http_copy_into_upload_err_total` appears twice, and 
`doris_fe_http_copy_into_query_err_total` does not appear.
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to