Changes for making extension work with lambda managed instance environment by sumoanema · Pull Request #30 · SumoLogic/sumologic-lambda-extensions

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements support for Lambda elevator mode (lambda-managed-instances) in the extension. The changes enable the extension to operate in two modes: standard mode (existing behavior) and elevator mode (new behavior), determined by the AWS_LAMBDA_INITIALIZATION_TYPE environment variable.

Key Changes:

  • Introduces new elevator producer/consumer architecture that uses HTTP server for receiving telemetry data and flush signaling mechanism
  • Modifies extension initialization and registration to conditionally support elevator mode
  • Updates Telemetry API schema version to "2025-01-29" for elevator mode

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lambda-extensions/workers/elevatorProducer.go New HTTP server implementation for receiving telemetry data in elevator mode with queue threshold monitoring
lambda-extensions/workers/elevatorConsumer.go New consumer implementation for processing queued telemetry data with signal-based flushing
lambda-extensions/sumologic-extension.go Main extension modified to detect and initialize elevator mode based on environment variable
lambda-extensions/lambdaapi/telemetryapiclient.go Updated to conditionally use different schema version based on mode
lambda-extensions/lambdaapi/extensionapiclient.go Modified to register different event types based on mode
lambda-extensions/lambdaapi/telemetryapiclient_test.go Test updated to pass new isElevator parameter
lambda-extensions/lambdaapi/extensionapiclient_test.go Test updated to pass new isElevator parameter

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.