-
Notifications
You must be signed in to change notification settings - Fork 1
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
NH-65069 Lambda layer 0.8 MB decrease #214
Conversation
Ready for review. Not sure why reviewers didn't automatically add when I first put this in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @tammy-baylis-swi!
Makefile
Outdated
aws-lambda: check-zip wrapper | ||
@if [ -f ./dist/solarwinds_apm_lambda_${platform}.zip ]; then \ | ||
echo -e "Deleting old solarwinds_apm_lambda_${platform}.zip"; \ | ||
rm ./dist/solarwinds_apm_lambda_${platform}.zip; \ | ||
fi | ||
rm -rf ./tmp | ||
rm -rf ./tmp-lambda |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor curiosity why this and a few other commands below don't use ${target_dir}
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason! Fixed in 29e600c 😸
Thank you @cheempz ! One more look when you have a moment please. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 thanks for the revisit!
This shrinks APM Python lambda layer zip size from 9.5 MB to 8.7 MB by removing super-upstream deps that don't seem to be needed for actual instrumentation. Otel Python does something similar in its builds: https://github.com/open-telemetry/opentelemetry-lambda/blob/main/python/src/otel/Dockerfile#L19-L20
Also removes an unused target
publish-lambda-layer-rc
and changes the temp dir name used for lambda publish, as it was conflicting with this dir for cert stuff.Tested that instrumentation still works by merging this with Settings API PoC branch, building and uploading new layer, attaching layer to function, and invoking function. Traces and metrics export still work: