...
Create or modify JAVA_TOOL_OPTIONS environment variable on AWS Lambda Function configuration page: add
-javaagent
parameter pointing to SL Test Listener which is placed in /opt directory.JAVA_TOOL_OPTIONS environment variable value can also contain sl properties which that we need to pass to the agent, for example:
Code Block language bash -javaagent:/opt/sl-test-listener.jar -Dsl.buildSessionIdFile=/var/task/buildSessionId.txt -Dsl.enableUpgrade=false -Dsl.tags=aws-lambda -Dsl.collectorUrl=http://mycollector.dns
You can set other environment variables - that will be picked up automatically by the agent - like SL_TOKEN, SL_BUILDSESSIONID, SL_LAB_ID & SL_COLLECTOR_URL (whose names match the SL properties by replacing “
.
" in the SL property name with "_
").
...