Instrument Lambda Functions
- Navigate to AWS Lambda and take a moment to understand the functions in this app. There are 4 of them: 'watchlistUpdater', 'stockRanker', 'getFinancials', and 'buyStocks'. The architecture of these functions will become clear once you instrument them for APM.
- Navigate to the Splunk O11y 'Data Setup' page, and search for
lambda
(you may have to clickExtend search across all integrations
). SelectAWS Lambda (Serverless instrumentation)
, and clickAdd Integration
. - For 'Function name', enter the name of the first Lambda function you will instrument (e.g.
watchlistUpdater
). Select your Splunk access token (make sure it has the right permissions for APM), and enter a name for this app's environment (e.g.lambda-app
). Click 'Next'. Make sure the environment name is the same for all your functions in this app. - On the 'Install Integration' page, select
Python
. Follow the steps on this page to add the Splunk OTel layer and set the environment variables. For the ARN, usearn:aws:lambda:us-east-1:254067382080:layer:splunk-apm:54
. - Phew! That was a lot. Now repeat Step 11 for all 4 Lambda functions. (You do not need to go through the Splunk O11y GDI wizard again; simply make the changes necessary in AWS.)
Last update:
August 11, 2022