Skip to content

fix(tracer): skip tracing CONNECT requests #4148

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

Merged
merged 4 commits into from
Jul 9, 2025
Merged

Conversation

dreamorosi
Copy link
Contributor

Summary

Changes

Please provide a summary of what's being changed

This PR fixes the bug described in the linked issue, which caused runtime errors when using the Tracer with requests being sent via a proxy using the fetch module. Moving forward, tracing of these requests will be skipped entirely and the only request that will appear in the trace data will be the one being proxied.

This aligns with the Powertools for AWS Lambda (Python) and X-Ray SDK implementations, as well as what suggested by the customer reporting the bug in the linked issue.

While working on this PR I also removed some old unit tests that covered portions of code that were deprecated. These same lines are also now excluded from the coverage report.

Please add the issue number below, if no issue is present the PR might get blocked and not be reviewed

Issue number: fixes #4114


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@dreamorosi dreamorosi self-assigned this Jul 8, 2025
@boring-cyborg boring-cyborg bot added documentation Improvements or additions to documentation tests PRs that add or change tests tracer This item relates to the Tracer Utility labels Jul 8, 2025
@pull-request-size pull-request-size bot added the size/L PRs between 100-499 LOC label Jul 8, 2025
@dreamorosi dreamorosi requested a review from svozza July 8, 2025 20:41
Copy link

sonarqubecloud bot commented Jul 9, 2025

@dreamorosi dreamorosi merged commit a147c3b into main Jul 9, 2025
46 checks passed
@dreamorosi dreamorosi deleted the fix/tracer_proxy_connect branch July 9, 2025 08:32
@daschaa
Copy link
Contributor

daschaa commented Jul 9, 2025

@dreamorosi you are a freakin' legend!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation size/L PRs between 100-499 LOC tests PRs that add or change tests tracer This item relates to the Tracer Utility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: [Tracer] instrumentFetch breaks when using proxy
3 participants