-
Notifications
You must be signed in to change notification settings - Fork 789
Fix for issue - #2808: Invalid type WSGIRequest for attribute 'request' value opentelemetry #3731
New issue
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
base: main
Are you sure you want to change the base?
Conversation
instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py
Outdated
Show resolved
Hide resolved
...nstrumentation-django/src/opentelemetry/instrumentation/django/middleware/otel_middleware.py
Outdated
Show resolved
Hide resolved
...nstrumentation-django/src/opentelemetry/instrumentation/django/middleware/otel_middleware.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again @rads-1996 , this lgtm. Maintainers will also have a look.
Thank you so much. Really appreciate the review :) |
...nstrumentation-django/src/opentelemetry/instrumentation/django/middleware/otel_middleware.py
Outdated
Show resolved
Hide resolved
...nstrumentation-django/src/opentelemetry/instrumentation/django/middleware/otel_middleware.py
Outdated
Show resolved
Hide resolved
...nstrumentation-django/src/opentelemetry/instrumentation/django/middleware/otel_middleware.py
Outdated
Show resolved
Hide resolved
…y-python-contrib into django-issue-fix
…y-python-contrib into django-issue-fix
ec091ea
to
27498de
Compare
for _, value_list in attributes.items(): | ||
for index, value in enumerate(value_list): | ||
if isinstance(value, HttpRequest): | ||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't str(value) enough instead of poking with HttpRequest internals?
([#3673](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3673)) | ||
- `opentelemetry-instrumentation-starlette`/`opentelemetry-instrumentation-fastapi`: Fixes a crash when host-based routing is used | ||
([#3507](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3507)) | ||
- `opentelemetry-instrumentation-django`: Fixes invalid type at WSGI request headers and attributes collection. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be moved to unreleased
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes #2808
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.