Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. 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.

    1. JAVA_TOOL_OPTIONS environment variable value can also contain sl properties which that we need to pass to the agent, for example:

      Code Block
      languagebash
       -javaagent:/opt/sl-test-listener.jar -Dsl.buildSessionIdFile=/var/task/buildSessionId.txt -Dsl.log.level=info -Dsl.log.enabled=true -Dsl.enableUpgrade=false -Dsl.log.toConsole=truetags=aws-lambda -Dsl.featuresData.codeCoverageManagerVersion=v3 -Dsl.tags=aws-lambdacollectorUrl=http://mycollector.dns
    2. You can set other environment variables - that will be picked up automatically by the agent - like SL_TOKEN, and SL_BUILDSESSIONID, SL_LAB_ID & SL_COLLECTOR_URL (whose names match the SL properties by replacing “." in the SL property name with "_").

...