| 69 | }; |
| 70 | |
| 71 | function expectScopeSettings() { |
| 72 | expect(mockScope.setContext).toBeCalledWith( |
| 73 | 'aws.lambda', |
| 74 | expect.objectContaining({ |
| 75 | aws_request_id: 'awsRequestId', |
| 76 | function_name: 'functionName', |
| 77 | function_version: 'functionVersion', |
| 78 | invoked_function_arn: 'invokedFunctionArn', |
| 79 | remaining_time_in_millis: 100, |
| 80 | }), |
| 81 | ); |
| 82 | |
| 83 | expect(mockScope.setContext).toBeCalledWith( |
| 84 | 'aws.cloudwatch.logs', |
| 85 | expect.objectContaining({ |
| 86 | log_group: 'logGroupName', |
| 87 | log_stream: 'logStreamName', |
| 88 | }), |
| 89 | ); |
| 90 | } |
| 91 | |
| 92 | describe('AWSLambda', () => { |
| 93 | beforeEach(() => { |