Skip to content

Commit

Permalink
Merge pull request #2822 from newrelic/two_kinds_of_koalas
Browse files Browse the repository at this point in the history
bring in the latest cross-agent AWS Lambda JSON
  • Loading branch information
fallwith authored Aug 20, 2024
2 parents 7965561 + fff6656 commit 77b0838
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
37 changes: 37 additions & 0 deletions test/fixtures/cross_agent_tests/lambda/event_source_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,43 @@
}
}
},
"apiGatewayV2": {
"expected_type": "apiGatewayV2",
"expected_arn": null,
"event": {
"version": "2.0",
"routeKey": "ANY /nodejs-apig-function-1G3XMPLZXVXYI",
"rawPath": "/default/nodejs-apig-function-1G3XMPLZXVXYI",
"rawQueryString": "",
"cookies": [
"s_fid=7AABXMPL1AFD9BBF-0643XMPL09956DE2",
"regStatus=pre-register"
],
"headers": {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-encoding": "gzip, deflate, br"
},
"requestContext": {
"accountId": "123456789012",
"apiId": "r3pmxmplak",
"domainName": "r3pmxmplak.execute-api.us-east-2.amazonaws.com",
"domainPrefix": "r3pmxmplak",
"http": {
"method": "GET",
"path": "/default/nodejs-apig-function-1G3XMPLZXVXYI",
"protocol": "HTTP/1.1",
"sourceIp": "205.255.255.176",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36"
},
"requestId": "JKJaXmPLvHcESHA=",
"routeKey": "ANY /nodejs-apig-function-1G3XMPLZXVXYI",
"stage": "default",
"time": "10/Mar/2020:05:16:23 +0000",
"timeEpoch": 1583817383220
},
"isBase64Encoded": true
}
},
"cloudFront": {
"expected_type": "cloudFront",
"expected_arn": null,
Expand Down
3 changes: 3 additions & 0 deletions test/new_relic/agent/serverless_handler_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ class ServerlessHandlerTest < Minitest::Test
'aws.lambda.eventSource.resourceId' => '123456',
'aws.lambda.eventSource.resourcePath' => '/{proxy+}',
'aws.lambda.eventSource.stage' => 'prod'},
'apiGatewayV2' => {'aws.lambda.eventSource.accountId' => '123456789012',
'aws.lambda.eventSource.apiId' => 'r3pmxmplak',
'aws.lambda.eventSource.stage' => 'default'},
'cloudWatch_scheduled' => {'aws.lambda.eventSource.account' => '{{{account-id}}}',
'aws.lambda.eventSource.id' => 'cdc73f9d-aea9-11e3-9d5a-835b769c0d9c',
'aws.lambda.eventSource.region' => 'us-west-2',
Expand Down

0 comments on commit 77b0838

Please sign in to comment.