@@ -301,8 +301,7 @@ def test_extract_trigger_tags_api_gateway(self):
301
301
{
302
302
"function_trigger.event_source" : "api-gateway" ,
303
303
"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" ,
306
305
"http.method" : "POST" ,
307
306
"http.route" : "/{proxy+}" ,
308
307
},
@@ -320,8 +319,7 @@ def test_extract_trigger_tags_api_gateway_non_proxy(self):
320
319
{
321
320
"function_trigger.event_source" : "api-gateway" ,
322
321
"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" ,
325
323
"http.method" : "GET" ,
326
324
"http.route" : "/http/get" ,
327
325
},
@@ -387,8 +385,7 @@ def test_extract_trigger_tags_api_gateway_http_api(self):
387
385
{
388
386
"function_trigger.event_source" : "api-gateway" ,
389
387
"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" ,
392
389
"http.method" : "GET" ,
393
390
"http.route" : "/httpapi/get" ,
394
391
},
@@ -406,7 +403,6 @@ def test_extract_trigger_tags_application_load_balancer(self):
406
403
{
407
404
"function_trigger.event_source" : "application-load-balancer" ,
408
405
"function_trigger.event_source_arn" : "arn:aws:elasticloadbalancing:us-east-2:123456789012:targetgroup/lambda-xyz/123abc" ,
409
- "http.url_details.path" : "/lambda" ,
410
406
"http.method" : "GET" ,
411
407
},
412
408
)
@@ -568,9 +564,7 @@ def test_extract_http_tags_with_invalid_request_context(self):
568
564
event = {"requestContext" : "not_a_dict" , "path" : "/test" , "httpMethod" : "GET" }
569
565
http_tags = extract_http_tags (event )
570
566
# 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" })
574
568
575
569
def test_extract_http_tags_with_invalid_apigateway_http (self ):
576
570
from datadog_lambda .trigger import extract_http_tags
0 commit comments