fix(http): http.url tag should contain the path#742
Open
Conversation
duncanista
approved these changes
Mar 10, 2026
Contributor
duncanista
left a comment
There was a problem hiding this comment.
LGTM – seems this has been fixed already in the Datadog Lambda Extension
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR updates the
http.urltag generation for HTTP-triggered Lambda events (API Gateway v1/v2 and Lambda Function URLs) to include the request path in addition to the domain name.Previously,
http.urlonly contained the scheme and host (https://{domain}), which did not fully align with the span attribute specification (scheme://host[/path]). This change appends the request path when constructinghttp.url.No query string handling or obfuscation logic is introduced in this PR in order to keep the change minimal and avoid altering existing behavior.
Motivation
According to the span attribute specification,
http.urlshould include the full request URL in the form:scheme://host[:port][/path][?query][#fragment]The previous implementation only reported the scheme and host, omitting the path. This resulted in incomplete URL information in spans generated from HTTP-triggered Lambda invocations.
This PR addresses that gap by including the request path, bringing the implementation closer to the documented specification while keeping the change scoped and low-risk.
Query string capture and obfuscation are intentionally left unchanged to avoid introducing behavioral changes related to cardinality or sensitive data handling in this incremental fix.
Testing Guidelines
http.urltag now includes the path (e.g., https://example.com/my/test/path).http.methodandhttp.url_details.pathremain unchanged.Additional Notes
APPSEC-61608
Types of Changes
Check all that apply