Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

experimental AWS Lambda Function support #70

Merged
merged 1 commit into from
Feb 22, 2022

Conversation

tom-pytel
Copy link
Contributor

@tom-pytel tom-pytel commented Feb 21, 2022

Explicit AWS Lambda Function plugins in their own aws/ subdirectory. Manual wrapping of AWS handler functions is required (much like the Azure Functions plugin), see the README. The following have been added:

  • AWSLambdaTriggerPlugin a generic wrapper which should work with all types of function triggers, but at the cost of information and linking back to calling endpoint.
  • AWSLambdaGatewayAPIHTTP specific wrapper for GatewayAPI HTTP type triggers, stores HTTP info and status code and allows linking back to calling endpoint.
  • AWSLambdaGatewayAPIREST same as above except for the GatewayAPI REST type trigger.
  • agent.flush() mechanism for synchronizing on segment data send. This is needed for AWS Lambdas because AWS freezes processes in between invocations.
  • ContextManager.removeTailFinishedContexts() to remove any finished spans from a context to break a parent-child chain which is invalid because sequential independent invocations of a handler are executed in inherited async contexts of previous runs instead of being executed hierarchically like most servers do (for AWS Lambda functions).

I will send up the component IDs to the main skywalking repo once tests are passed.

@tom-pytel tom-pytel requested a review from kezhenxu94 February 21, 2022 18:03
@tom-pytel tom-pytel added enhancement New feature or request plugin labels Feb 21, 2022
@tom-pytel tom-pytel added this to the 0.4.0 milestone Feb 21, 2022
Copy link
Member

@kezhenxu94 kezhenxu94 left a comment

Choose a reason for hiding this comment

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

And please check the CI failures

src/trace/Component.ts Show resolved Hide resolved
@tom-pytel
Copy link
Contributor Author

Will merge when main sw repo accepts component IDs.

@tom-pytel tom-pytel merged commit b29d5ea into apache:master Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants