Skip to content

Commit

Permalink
fix: None does not implement middleware when there are no middlewares (
Browse files Browse the repository at this point in the history
  • Loading branch information
mshebeko-twist authored Apr 19, 2023
1 parent d01c96f commit 2d4e6c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Fix `AttributeError` when AWS Lambda handler receives a list event
([#1738](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1738))

- Fix `None does not implement middleware` error when there are no middlewares registered
([#1766](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1766))

## Version 1.17.0/0.38b0 (2023-03-22)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ def __init__(self, *args, **kwargs):

# inject trace middleware
self._middlewares_list = kwargs.pop("middleware", [])
if self._middlewares_list is None:
self._middlewares_list = []

tracer_provider = otel_opts.pop("tracer_provider", None)
meter_provider = otel_opts.pop("meter_provider", None)
if not isinstance(self._middlewares_list, (list, tuple)):
Expand Down

0 comments on commit 2d4e6c9

Please sign in to comment.