Relax httpx version to allow >= 0.18.0 (#1748)

This commit is contained in:
Phillip Verheyden
2023-06-13 08:07:28 -05:00
committed by GitHub
parent 37d85f0745
commit a5ed4da478
5 changed files with 7 additions and 5 deletions

View File

@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased ## Unreleased
- Instrument all httpx versions >= 0.18. ([#1748](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1748))
## Version 1.18.0/0.39b0 (2023-05-10) ## Version 1.18.0/0.39b0 (2023-05-10)
- `opentelemetry-instrumentation-system-metrics` Add `process.` prefix to `runtime.memory`, `runtime.cpu.time`, and `runtime.gc_count`. Change `runtime.memory` from count to UpDownCounter. ([#1735](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1735)) - `opentelemetry-instrumentation-system-metrics` Add `process.` prefix to `runtime.memory`, `runtime.cpu.time`, and `runtime.gc_count`. Change `runtime.memory` from count to UpDownCounter. ([#1735](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1735))

View File

@ -32,7 +32,7 @@ dependencies = [
[project.optional-dependencies] [project.optional-dependencies]
instruments = [ instruments = [
"httpx >= 0.18.0, <= 0.23.0", "httpx >= 0.18.0",
] ]
test = [ test = [
"opentelemetry-instrumentation-httpx[instruments]", "opentelemetry-instrumentation-httpx[instruments]",

View File

@ -59,7 +59,7 @@ def _async_call(coro: typing.Coroutine) -> asyncio.Task:
def _response_hook(span, request: "RequestInfo", response: "ResponseInfo"): def _response_hook(span, request: "RequestInfo", response: "ResponseInfo"):
span.set_attribute( span.set_attribute(
HTTP_RESPONSE_BODY, HTTP_RESPONSE_BODY,
response[2].read(), b"".join(response[2]),
) )
@ -68,7 +68,7 @@ async def _async_response_hook(
): ):
span.set_attribute( span.set_attribute(
HTTP_RESPONSE_BODY, HTTP_RESPONSE_BODY,
await response[2].aread(), b"".join([part async for part in response[2]]),
) )

View File

@ -81,7 +81,7 @@ libraries = {
"instrumentation": "opentelemetry-instrumentation-grpc==0.40b0.dev", "instrumentation": "opentelemetry-instrumentation-grpc==0.40b0.dev",
}, },
"httpx": { "httpx": {
"library": "httpx >= 0.18.0, <= 0.23.0", "library": "httpx >= 0.18.0",
"instrumentation": "opentelemetry-instrumentation-httpx==0.40b0.dev", "instrumentation": "opentelemetry-instrumentation-httpx==0.40b0.dev",
}, },
"jinja2": { "jinja2": {

View File

@ -277,7 +277,7 @@ deps =
httpx18: httpx>=0.18.0,<0.19.0 httpx18: httpx>=0.18.0,<0.19.0
httpx18: respx~=0.17.0 httpx18: respx~=0.17.0
httpx21: httpx>=0.19.0 httpx21: httpx>=0.19.0
httpx21: respx~=0.19.0 httpx21: respx~=0.20.1
; FIXME: add coverage testing ; FIXME: add coverage testing
; FIXME: add mypy testing ; FIXME: add mypy testing