We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When we bumped opentelemetry-instrumentation-asgi to 0.45b0, we got type errors due to the changes introduced by PR #2026.
opentelemetry-instrumentation-asgi
error: Argument 1 to "add_middleware" of "Starlette" has incompatible type "type[AsgiMiddleware]"; expected "type[_MiddlewareClass[[]]]" [arg-type]
The problem is that it is specifying the types as dict, whereas Starlette requires MutableMapping. See https://github.com/encode/starlette/blob/9f16bf5c25e126200701f6e04330864f4a91a898/starlette/types.py#L10-L14.
Describe your environment
Steps to reproduce Describe exactly how to reproduce the error. Include a code sample if applicable.
What is the expected behavior? It should be possible to add OpentelemetryMiddleware to starlette/fastapi
What is the actual behavior? Got a type error
The text was updated successfully, but these errors were encountered:
Closing as it seems starlette is using broader types than what the spec specifies. See encode/starlette#2040
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
When we bumped
opentelemetry-instrumentation-asgi
to 0.45b0, we got type errors due to the changes introduced by PR #2026.The problem is that it is specifying the types as dict, whereas Starlette requires MutableMapping. See https://github.com/encode/starlette/blob/9f16bf5c25e126200701f6e04330864f4a91a898/starlette/types.py#L10-L14.
Describe your environment
Steps to reproduce
Describe exactly how to reproduce the error. Include a code sample if applicable.
What is the expected behavior?
It should be possible to add OpentelemetryMiddleware to starlette/fastapi
What is the actual behavior?
Got a type error
The text was updated successfully, but these errors were encountered: