Skip to content

Conversation

@rads-1996
Copy link
Contributor

@rads-1996 rads-1996 commented Aug 26, 2025

Description

Fixes #4732

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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

  • Unit tests have been added.

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@rads-1996 rads-1996 requested a review from a team as a code owner August 26, 2025 19:17
@rads-1996 rads-1996 marked this pull request as draft August 26, 2025 21:20
@rads-1996 rads-1996 marked this pull request as ready for review August 26, 2025 23:39
value = value[:max_len]
return value

if _WSGIRequest is not None and isinstance(value, _WSGIRequest):
Copy link
Contributor

@xrmx xrmx Aug 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the right place to handle this. This function expect value to be of type AnyValue so callers should respect that.
Since you have a reproducer to debug this I'll get a stacktrace (with the traceback module or a debugger) when value is a WSGIRequest and post it on the issue.

@xrmx xrmx moved this to Reviewed PR that needs fixing in @xrmx's Python PR digest Aug 27, 2025
@xrmx
Copy link
Contributor

xrmx commented Aug 29, 2025

Closing this, I think the proper fix would be a PR in -contrib

@xrmx xrmx closed this Aug 29, 2025
@github-project-automation github-project-automation bot moved this from Reviewed PR that needs fixing to Done in @xrmx's Python PR digest Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Invalid type WSGIRequest for attribute 'request' value opentelemetry

2 participants