-
Notifications
You must be signed in to change notification settings - Fork 146
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
fix(tracer): include request pathname in trace data #2955
Conversation
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.
APPROVED!
627efab
to
9fb61f0
Compare
Quality Gate passedIssues Measures |
Integration tests passing: https://github.com/aws-powertools/powertools-lambda-typescript/actions/runs/10794586570 |
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.
APPROVED!
Summary
Changes
This PR modifies the internal implementation of the Tracer patching for the
fetch
request module so that it includes the pathname of a request in the segment data.As reported in the linked issue, the current implementation only records the host name, so a request to
https://aws.amazon.com/free
would generate a segment similar to this:while it should have generated one like this:
Notice how the
http.request.url
includes both the path and protocol.The PR also modifies and adds some unit tests to account for the updated logic.
Issue number: closes #2954
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.