Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions integration-tests/tests/lmi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,23 @@ describe('LMI Integration Tests', () => {
expect(awsLambdaSpan?.attributes.custom.init_type).toBe('lambda-managed-instances')
})
// SVLS-8232
test.skip('aws.lambda.span should have cold_start set to false', () => {
it('aws.lambda.span should have cold_start set to false if no cold_start operation', () => {
const trace = results[runtime].traces![0];

// The presence of 'aws.lambda.cold_start' span indicates a cold start
const coldStartSpan = trace.spans.find((span: any) =>
span.attributes.operation_name === 'aws.lambda.cold_start'
);

const awsLambdaSpan = trace.spans.find((span: any) =>
span.attributes.operation_name === 'aws.lambda'
);
expect(awsLambdaSpan?.attributes.custom.cold_start).toBe('false')
expect(awsLambdaSpan).toBeDefined(); // Ensure span exists before checking attributes

// Only check cold_start attribute when no dedicated cold_start span exists
if (!coldStartSpan) {
expect(awsLambdaSpan?.attributes.custom.cold_start).toBe('false');
}
})

});
Expand Down
Loading