You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "csbiy (via GitHub)" <gi...@apache.org> on 2026/01/18 04:08:04 UTC
[PR] Update Python agent to v1.2.0 with forking support and PVM metrics [skywalking-showcase]
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: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Update Python agent to v1.2.0 with forking support and PVM metrics [skywalking-showcase]
Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng merged PR #228:
URL: https://github.com/apache/skywalking-showcase/pull/228
--
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-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Update Python agent to v1.2.0 with forking support and PVM metrics [skywalking-showcase]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #228:
URL: https://github.com/apache/skywalking-showcase/pull/228#discussion_r2702084861
##########
services/recommendation-service/requirements.txt:
##########
@@ -1,2 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
Flask==2.3.2
requests==2.26.0
Review Comment:
The requests library version 2.26.0 is outdated and has known security vulnerabilities. Consider upgrading to a more recent version (2.31.0 or later) to address security concerns. While this is not introduced in this PR, since you're already updating dependencies and upgrading Python versions, it would be prudent to update this dependency as well.
```suggestion
requests==2.31.0
```
--
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-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org