Skip to content

Latest commit

 

History

History
87 lines (61 loc) · 2.68 KB

File metadata and controls

87 lines (61 loc) · 2.68 KB

Sample applications deployment

Every Sumo Logic Lambda Layer can be tested with the following sample applications provided by OpenTelemetry Lambda.

Requirements

Deployment

  1. Checkout repository

    git clone --recurse-submodules https://github.com/SumoLogic/sumologic-otel-lambda.git
  2. Download sample application function code

    • java

      wget https://github.com/SumoLogic/sumologic-otel-lambda/releases/download/java-v1.30.1/java-sample-app.jar -o java/sample-apps/java-sample-app.jar
    • nodejs

      wget https://github.com/SumoLogic/sumologic-otel-lambda/releases/download/nodejs-v1.17.1/nodejs-sample-app.zip -o nodejs/sample.zip
      unzip nodejs/sample.zip -d nodejs/sample-apps
    • python

      wget https://github.com/SumoLogic/sumologic-otel-lambda/releases/download/python-v1.20.0/python-sample-app.zip -o python/sample.zip
      unzip python/sample.zip -d python/sample-apps
  3. Unzip downloaded code

    In one of the directories nodejs or python unzip the sample application running. Note: omit step if java.

    cd sample-apps
    unzip function.zip -d sample_function
  4. Set Sumo Logic HTTP Traces Source URL and AWS Region

    export SUMO_OTLP_HTTP_ENDPOINT_URL=https://YOUR_OTLP_HTTP_SOURCE_URL
    export AWS_REGION=YOUR_AWS_REGION
  5. Deploy sample application lambda function

    For nodejs and python execute:

    sam build -u && sam deploy --stack-name sumo-logic-example-function \
    --template template.yaml \
    --parameter-overrides ParameterKey=SumoHttpTracesSourceUrl,ParameterValue=${SUMO_OTLP_HTTP_ENDPOINT_URL} \
    --capabilities CAPABILITY_IAM \
    --region ${AWS_REGION} \
    --resolve-s3

    For java execute:

    sam deploy --stack-name sumo-logic-example-function \
    --template template.yaml \
    --parameter-overrides ParameterKey=SumoHttpTracesSourceUrl,ParameterValue=${SUMO_OTLP_HTTP_ENDPOINT_URL} \
    --capabilities CAPABILITY_IAM \
    --region ${AWS_REGION} \
    --resolve-s3
  6. Invoke function

    After successful deployment of the sample lambda function, the SampleAppApiEndpoint should be displayed. Please use its value as URL.

    curl SampleAppApiEndpointValue