Skip to content

Commit

Permalink
update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
nozik committed Jan 18, 2022
1 parent 0149a6c commit 30831a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `opentelemetry-instrumentation-asgi` now returns a `traceresponse` response header.
([#817](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/817))

- `opentelemetry-instrumentation-httpx` now supports versions higher than `0.19.0`.
([#866](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/866))

### Fixed

- `opentelemetry-instrumentation-flask` Flask: Conditionally create SERVER spans
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def _prepare_headers(headers: typing.Optional[Headers]) -> httpx.Headers:


def extract_parameters(args, kwargs):
if type(args[0]) == httpx.Request:
if isinstance(args[0], httpx.Request):
request: httpx.Request = args[0]
method = request.method.encode()
url = request.url
Expand All @@ -256,7 +256,7 @@ def extract_parameters(args, kwargs):
def inject_propagation_headers(headers, args, kwargs):
_headers = _prepare_headers(headers)
inject(_headers)
if type(args[0]) == httpx.Request:
if isinstance(args[0], httpx.Request):
request: httpx.Request = args[0]
request.headers = _headers
else:
Expand Down Expand Up @@ -321,7 +321,7 @@ def handle_request(

inject_propagation_headers(headers, args, kwargs)
response = self._transport.handle_request(*args, **kwargs)
if type(response) == httpx.Response:
if isinstance(response, httpx.Response):
response: httpx.Response = response
status_code = response.status_code
headers = response.headers
Expand Down Expand Up @@ -401,7 +401,7 @@ async def handle_async_request(
response = await self._transport.handle_async_request(
*args, **kwargs
)
if type(response) == httpx.Response:
if isinstance(response, httpx.Response):
response: httpx.Response = response
status_code = response.status_code
headers = response.headers
Expand Down

0 comments on commit 30831a8

Please sign in to comment.