Skip to content

Conversation

@xrmx
Copy link
Contributor

@xrmx xrmx commented Dec 23, 2025

Description

This PR adds support to capture and sanitize custom client headers in the urllib3 instrumentation.

Refs #3962

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

  • tox

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

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

@xrmx xrmx requested a review from a team as a code owner December 23, 2025 13:32
@herin049
Copy link
Contributor

I did a little bit of digging into the urllib source and it looks like some headers are added within OpenerDirector:open that we are currently wrapping. If we want all header information before the request is sent, we should probably wrap the HttpConnection:_send_request method.

xrmx and others added 3 commits December 24, 2025 09:26
Co-authored-by: Lukas Hering <40302054+herin049@users.noreply.github.com>
Co-authored-by: Lukas Hering <40302054+herin049@users.noreply.github.com>
@herin049
Copy link
Contributor

LGTM

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.

3 participants