Skip to content
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

Fixing typing for _ResponseHookT for requests instrumentation. #2041

Closed
wants to merge 1 commit into from

Conversation

JPFrancoia
Copy link

@JPFrancoia JPFrancoia commented Nov 6, 2023

Description

This PR fixes a typing error for the request hook of the requests instrumentation.

The type for this callable is defined here:

But as we can see on this line: https://github.com/open-telemetry/opentelemetry-python-contrib/blob/eb6024ca3171072daa5d842d9363e41d72ee64a6/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py#L211C24-L211C24, the number of arguments don't match. This PR fixes the problem.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

This PR was not tested, it's only about type hinting. It's a trivial one-liner. Moreover, the request and response hooks for the requests library aren't mentioned in the docs (AFAIK) so I don't think this PR needs a doc update.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

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

@JPFrancoia
Copy link
Author

Actually a dup of: #2038. Closing

@JPFrancoia JPFrancoia closed this Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants