This integration allows Magento (Adobe Commerce) websites to send log data directly to Datadog, enabling centralized monitoring and enhanced observability. The integration can either make use of the Datadog API or Datadog Agent. Merchants can monitor their website's logs in Datadog instead of painfully digging into var/log
folder. The Integration consolidates all available logs into a single source and then sends it to Datadag based on severity levels. This limits any manual action on a production environment, eliminating any risks associated with it.
- Ensure your Adobe Commerce or Magento marketpace account has the Datadog Logs Integration added to it. Your developers can pull the package using the Composer steps later on.
- A Datadog account with an API Key is required. Create an API Key from your Datadog account if you don’t already have one.
-
Navigate to the Magento root directory. Access your Magento root directory through the CLI.
-
Install the module using Composer with the following command:
composer require maurisource/datadog
-
After the installation is complete, enable the module by running:
bin/magento module:enable Maurisource_Datadog
-
Update the Magento system to recognize the new module:
bin/magento setup:upgrade
-
If your store is in production mode, deploy static content:
bin/magento setup:static-content:deploy
-
Clear the Magento cache to ensure the changes take effect:
bin/magento cache:flush
-
Log in to the Adobe Commerce Admin Panel.
-
Navigate to Stores > Configuration > Maurisource > Datadog.
-
Set the following fields:
- Datadog Logs Enabled: Yes.
- Debug Enabled: As per your needs (Yes or No).
- Save Datadog Logs In: Choose "DB" if using API or "File" if Datadog Agent is installed.
- Minimum Level: Set the log severity (for example, DEBUG, WARNING, or ERROR).
- Account Region: Choose your Datadog region (for example, United States or Europe).
- API Key: Paste the API Key from your Datadog account.
-
Save the configuration and monitor logs directly in your Datadog dashboard.
- For Adobe Commerce environments without Datadog Agent: Set Save Datadog Logs In to "DB" because third-party services cannot run on the environment. This option makes use of the Datadog API to transmit logs. No further configuration is needed.
- For on-premises setups with Datadog Agent: Set Save Datadog Logs In to "File". This creates a centralized
DatadogLogger.log
file in thevar/log
folder. Follow the next section to configure the agent to collect logs from that file.
Available for Agent versions >6.0
-
Collecting logs is disabled by default in the Datadog Agent, enable it in your
datadog.yaml
file:logs_enabled: true
-
Add this configuration block to your
maurisource_mangento.d/conf.yaml
file to start collecting your Magento Logs:logs: - type: file path: /var/log/DatadogLogger.log service: 'maurisource_magento' source: maurisource_mangento_logs
For containerized environments, see Container Monitoring for guidance.
Select your containerized environment and follow the Log Collection instructions.
To uninstall this integration from Datadog, click the Uninstall Integration button.
For support contact Maurisource at:
- Email: [email protected]
- Website: https://maurisource.com/
Need help? Open a support ticket Maurisource support.