You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "wu-sheng (via GitHub)" <gi...@apache.org> on 2026/04/12 08:54:32 UTC
[PR] feat: re-enable aiohttp/psycopg2 and add falcon v3/sanic v2 plugins [skywalking-python]
wu-sheng opened a new pull request, #389:
URL: https://github.com/apache/skywalking-python/pull/389
## Summary
Re-enable previously skipped plugins and add new plugins for modern framework versions. All changes verified locally with span data validation on Python 3.13.
### Plugin changes
| Plugin | Change | Tested Versions | Verified |
|--------|--------|-----------------|----------|
| aiohttp | Re-enable, fix `_handle_request` sig + yarl URL fallback | 3.9, 3.11 | PASSED |
| psycopg2 | Re-enable with `2.9.*` wildcard | 2.9.* (→2.9.11) | PASSED |
| falcon v3 | New `sw_falcon_v3.py`, hooks `falcon.App.__call__` | 3.1, 4.0 | PASSED (4.0) |
| sanic v2 | New `sw_sanic_v2.py`, uses signal listeners | 23.12, 24.12 | PASSED |
### Key design decisions
**sanic v2 — signal listeners instead of monkey-patch:**
Sanic's [touchup system](https://github.com/sanic-org/sanic/blob/main/sanic/touchup/schemes/base.py) recompiles `handle_request` at startup via `compile()` + `exec()` with Sanic's own `module_globals`, losing the patched function's closure variables (`NameError: name 'Carrier' is not defined`). Using `@app.on_request` / `@app.on_response` signal listeners avoids this — they are registered callbacks, not recompiled methods.
**aiohttp — yarl URL fallback:**
yarl >= 1.18 rejects `Host` containing `:` (e.g., `0.0.0.0:9090`). `request.url` triggers `URL.build(host=self.host)` which fails. Added try/except fallback to construct URL from `request.scheme`, `request.host`, and `request.path`.
**falcon v3 — falcon 3.1 skipped on 3.13+:**
falcon 3.1 has no cp313 wheels and fails to build from source. Only falcon 4.0 is tested on Python 3.13+.
### E2E flaky fix
`tracing-cases.yaml` and `logging-cases.yaml`: change `endpointnames[0]` to `endpointnames[]` in yq queries. The endpoint names array ordering from OAP is non-deterministic — using `[]` matches the endpoint at any position.
## Test plan
- [x] aiohttp 3.9/3.11 — PASSED locally (Python 3.13, span validation)
- [x] psycopg2-binary 2.9.* — PASSED locally (Python 3.13, span validation)
- [x] falcon 4.0 — PASSED locally (Python 3.13, span validation)
- [x] sanic 23.12/24.12 — PASSED locally (Python 3.13, span validation)
- [ ] CI: all existing tests still pass on 3.10/3.11/3.12
- [ ] CI: new falcon v3 and sanic v2 tests pass
- [ ] CI: E2E gRPC-single-process no longer flaky
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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] feat: re-enable aiohttp/psycopg2 and add falcon v3/sanic v2 plugins [skywalking-python]
Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng merged PR #389:
URL: https://github.com/apache/skywalking-python/pull/389
--
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