Duansg opened a new pull request, #3810:
URL: https://github.com/apache/hertzbeat/pull/3810

   ## What's changed?
   
   refactor #3773
   
   Refactor and optimized support for UTF-8 encoding in certain Prometheus 
label values.
   
   1. Optimize fixed-size arrays to avoid dynamic allocation and prevent 
unnecessary memory consumption.
   2. Add the replacement character `\uFFFD` when handling UTF-8 errors to 
comply with standards.
   3. Added basic over-encoding checks and format validation.
   4. Optimize exception handling and subsequent error validation.
   5. Optimized certain processing logic to reduce unnecessary operations for 
early validation.
   6. Passed historical and newly added test cases
   
   
   Reference:
   1. https://datatracker.ietf.org/doc/html/rfc3629
   2. https://en.wikipedia.org/wiki/UTF-8
   
   ## Checklist
   
   - [x]  I have read the [Contributing 
Guide](https://hertzbeat.apache.org/docs/community/code_style_and_quality_guide)
   - [x]  I have written the necessary doc or comment.
   - [x]  I have added the necessary unit tests and all cases have passed.
   
   ## Add or update API
   
   - [ ] I have added the necessary [e2e 
tests](https://github.com/apache/hertzbeat/tree/master/e2e) and all cases have 
passed.
   
   > Monitors
   <img width="1450" height="462" alt="Snipaste_2025-10-09_15-46-59" 
src="https://github.com/user-attachments/assets/1c611c1b-5fec-4b1f-80b3-23b20c151769";
 />
   
   > Alarms
   <img width="1503" height="636" alt="Snipaste_2025-10-09_15-58-43" 
src="https://github.com/user-attachments/assets/392be929-c973-4b4c-abb3-261a89280aa8";
 />
   
   
   


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