Add HTTP/2 support and protocol version logging#232
Conversation
- feat: enable HTTP/2 negotiation on the synchronous httpx handler - feat: add http_version field to ResponseInfo - feat: log negotiated protocol version at DEBUG level across all request handlers
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
| logger.debug( | ||
| "PubNub request completed: operation=%s protocol=%s" | ||
| % (options.operation_type, response_info.http_version) | ||
| ) |
There was a problem hiding this comment.
debug probably over informative, but we don't have other levels yet.
I would suggest to merge it with data log above.
| logger.debug( | ||
| "PubNub request completed: operation=%s protocol=%s" | ||
| % (options.operation_type, response_info.http_version) | ||
| ) |
There was a problem hiding this comment.
debug probably over informative, but we don't have other levels yet.
I would suggest to merge it with data log above.
| logger.debug( | ||
| "PubNub request completed: operation=%s protocol=%s" | ||
| % (e_options.operation_type, http_ver) | ||
| ) |
There was a problem hiding this comment.
Should we actually print it if version information available in response?
There was a problem hiding this comment.
Here's what I've been told to deliver:
Deliverables:
Debug logs such as:
PubNub request completed: operation=subscribe protocol=HTTP/2
PubNub request completed: operation=publish protocol=HTTP/1.1
I'll try to make it less noisy and merge it with data logs you suggested
There was a problem hiding this comment.
Ok, I've missed operation in the format.
There was a problem hiding this comment.
This one should be instructed in a same way as AsyncClient need to specify http2=True in constructor.
There was a problem hiding this comment.
But where is http2=True in constructor?
feat: enable HTTP/2 negotiation on the synchronous
httpxhandlerfeat: add
http_versionfield toResponseInfofeat: log negotiated protocol version at DEBUG level across all request handlers