To log and monitor errors, we use DataDog. This makes it easier to diagnose bugs found in the application.
The application is already set up to log to DataDog using their SDK, see logger.js. As a result, the only thing that needs to be done is setting the required DataDog API key in the variables on your Terraform App.
- Create a DataDog organisation (if your trust doesn't have one already)
- Within the Integrations section of your organistation, click on APIs
- Choose API Keys and Create a new API Key
- This API key is to be added to the Terraform App as a variable 'datadog_api_key' declared in variables.tf
The following variable is needed to be added to your organisation's Terraform App:
datadog_api_key
To add a variable to a Terraform app. In your Terraform App:
- Click on the workspace name for your project
- Choose Variables and Create a new API Key
- Click on the Add variable button
- Enter Key as
datadog_api_key
- Enter Value as your API key that you have created in 'Creating a DataDog Organisation and API Key' section.
- Click Save variable button
Note: The datadog_api_key
is referred to in the section Setting Up Terraform