@@ -301,8 +301,7 @@ def test_extract_trigger_tags_api_gateway(self):
301301 {
302302 "function_trigger.event_source" : "api-gateway" ,
303303 "function_trigger.event_source_arn" : "arn:aws:apigateway:us-west-1::/restapis/1234567890/stages/prod" ,
304- "http.url" : "https://70ixmpl4fl.execute-api.us-east-2.amazonaws.com" ,
305- "http.url_details.path" : "/prod/path/to/resource" ,
304+ "http.url" : "https://70ixmpl4fl.execute-api.us-east-2.amazonaws.com/prod/path/to/resource" ,
306305 "http.method" : "POST" ,
307306 "http.route" : "/{proxy+}" ,
308307 },
@@ -320,8 +319,7 @@ def test_extract_trigger_tags_api_gateway_non_proxy(self):
320319 {
321320 "function_trigger.event_source" : "api-gateway" ,
322321 "function_trigger.event_source_arn" : "arn:aws:apigateway:us-west-1::/restapis/lgxbo6a518/stages/dev" ,
323- "http.url" : "https://lgxbo6a518.execute-api.eu-west-1.amazonaws.com" ,
324- "http.url_details.path" : "/dev/http/get" ,
322+ "http.url" : "https://lgxbo6a518.execute-api.eu-west-1.amazonaws.com/dev/http/get" ,
325323 "http.method" : "GET" ,
326324 "http.route" : "/http/get" ,
327325 },
@@ -387,8 +385,7 @@ def test_extract_trigger_tags_api_gateway_http_api(self):
387385 {
388386 "function_trigger.event_source" : "api-gateway" ,
389387 "function_trigger.event_source_arn" : "arn:aws:apigateway:us-west-1::/restapis/x02yirxc7a/stages/$default" ,
390- "http.url" : "https://x02yirxc7a.execute-api.eu-west-1.amazonaws.com" ,
391- "http.url_details.path" : "/httpapi/get" ,
388+ "http.url" : "https://x02yirxc7a.execute-api.eu-west-1.amazonaws.com/httpapi/get" ,
392389 "http.method" : "GET" ,
393390 "http.route" : "/httpapi/get" ,
394391 },
@@ -406,7 +403,6 @@ def test_extract_trigger_tags_application_load_balancer(self):
406403 {
407404 "function_trigger.event_source" : "application-load-balancer" ,
408405 "function_trigger.event_source_arn" : "arn:aws:elasticloadbalancing:us-east-2:123456789012:targetgroup/lambda-xyz/123abc" ,
409- "http.url_details.path" : "/lambda" ,
410406 "http.method" : "GET" ,
411407 },
412408 )
@@ -568,9 +564,7 @@ def test_extract_http_tags_with_invalid_request_context(self):
568564 event = {"requestContext" : "not_a_dict" , "path" : "/test" , "httpMethod" : "GET" }
569565 http_tags = extract_http_tags (event )
570566 # Should still extract valid tags from the event
571- self .assertEqual (
572- http_tags , {"http.url_details.path" : "/test" , "http.method" : "GET" }
573- )
567+ self .assertEqual (http_tags , {"http.method" : "GET" })
574568
575569 def test_extract_http_tags_with_invalid_apigateway_http (self ):
576570 from datadog_lambda .trigger import extract_http_tags
0 commit comments