yashisrani opened a new pull request, #3629:
URL: https://github.com/apache/dubbo-go/pull/3629

   ### Description
   
   **Before:** `Export()` launched `go p.exportHttp()` and returned 
immediately. The HTTP server started asynchronously, so Prometheus could scrape 
the target before it was ready.
   
   **After:** `Export()` blocks until the TCP listener is bound and the server 
is accepting connections (with a 10-second timeout). This guarantees the 
metrics endpoint is ready before the service reports healthy.
   
   Fixes #3628
   
   ## Special notes for your reviewer:
   
   - No breaking change to the public API — `Export()` still returns void
   - The 10-second timeout prevents indefinite blocking if the port is 
unavailable
   - All existing unit tests pass (`go test ./metrics/prometheus/...`)
   - This fix also improves error handling: listen failures are now logged 
immediately rather than silently failing in a background goroutine
   
   
   ### Checklist
   - [x] I confirm the target branch is `develop`
   - [x] Code has passed local testing
   - [x] I have added tests that prove my fix is effective or that my feature 
works
   
   <img width="1470" height="622" alt="Screenshot 2026-08-09 at 4 45 15 PM" 
src="https://github.com/user-attachments/assets/af5636b1-eb57-4c49-a1d8-6896f8fd800a";
 />


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