/serverless-sample-app

Explore Datadog's serverless observability features with this sample app.

Primary LanguageShellOtherNOASSERTION

Serverless Sample App

Launch Stack

For more information on Datadog Serverless, check out our Serverless Info page!

Try out Datadog:

  1. Click "Launch Stack" above.
  2. Enter Datadog API Key and the Datadog Site you are registered with, acknowledge IAM Capabilities, and click Create Stack. See this link for more info on API keys.
  3. Once the stack has finished creating, open the Outputs tab in the stack information view.
  4. Invoke your stack 3-4 times by visiting the ApiGatewayInvokeURL url given in the Outputs tab.
  5. Wait a couple minutes for the data to finish flushing to Datadog.
  6. Visit the DatadogFunctionLink in the Outputs tab to explore your data.
    • Alternatively, visit Datadog's serverless view for your registered site (such as https://app.datadoghq.com/functions for those registered on the US1 site).
    • Under Function Name on the left side of the site, search for the the entry function name also given in the stack Outputs tab.

Sample App Architecture

Architecture

Sample Trace Map

  • The trace map of your resources you can expect to see in Datadog.

Sample Trace Map

Repository Structure:

This repository is organized into four main files: template.yaml, handler.js, handler.py, and publish.sh.

While our distributed template contains inline lambda code, the code is separated into handler.js and handler.py files in this repo for easier development. The code in these two files are injected into the template.yaml during the publishing process through the publish.sh script.

For information on how to inject the code and create a ready-to-use template outside publishing, refer to the CONTRIBUTING.md file.