csbiy opened a new pull request, #228:
URL: https://github.com/apache/skywalking-showcase/pull/228

   ## Summary
   
   This PR updates the recommendation-service to use the latest Python agent 
(v1.2.0) and enables key features requested in #10555.
   
   ### Changes
   
   - **Python Agent Upgrade**: `0.7.0` → `1.2.0`
   - **Python Version**: `3.9` → `3.10` (using slim image)
   - **WSGI Server**: Added `gunicorn` for production-ready deployment
   - **Forking Support**: Enabled with `-p` flag to demonstrate service 
instance naming for child processes
   - **PVM Meter Reporter**: Automatically enabled by default in v1.0.0+
   
   ### Files Modified
   
   | File | Change |
   |------|--------|
   | `services/recommendation-service/Dockerfile` | Updated base image and CMD |
   | `services/recommendation-service/requirements.txt` | Added gunicorn 
dependency |
   | `services/recommendation-service/src/app.py` | Refactored for gunicorn 
compatibility |
   
   ### Testing
   
   - ✅ Docker image builds successfully
   - ✅ Gunicorn starts with 2 workers
   - ✅ Forking support detected by agent
   - ✅ Health endpoint responds correctly
   
   ### Docker Build Log (excerpt)
   
   ```
   skywalking-cli [INFO] Detected experimental prefork support flag, checking 
for pre-forking servers...
   skywalking-cli [INFO] We noticed you are using Gunicorn, agent will 
automatically start the SkyWalking Python Agent in all child (worker) processes 
and the master.
   [INFO] Starting gunicorn 21.2.0
   [INFO] Listening at: http://0.0.0.0:80 (1)
   [INFO] Using worker: sync
   [INFO] Booting worker with pid: 7
   [INFO] Booting worker with pid: 8
   ```
   
   Resolves apache/skywalking#10555


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

Reply via email to