Skip to Content
Menu
This question has been flagged
2 Replies
1572 Views

Is there any way to send logs from odoo sh to datadog ? When I try it on my machine it works and data can be seen on my datadog account but I am not sure how to do that in odoo sh. 

Avatar
Discard
Author Best Answer

I mean can't we just install datadog agent on the odoo instance that is running on the odoo sh

Avatar
Discard
Best Answer

Yes, it is possible to send logs from Odoo.sh to Datadog. You can use the Datadog API to send logs directly​. Here are the general steps:

  1. Generate a Datadog API Key: You’ll need this to authenticate your requests. You can generate one in the API settings of your Datadog account.
  2. Format Your Log Data: Datadog accepts log data in JSON format. Each log should be a dictionary with a message field and may include standard fields such as host and timestamp.
  3. Send the Log Data: Use an HTTP POST request to send your log data to the Datadog API. The endpoint for this is https://http-intake.logs.datadoghq.com/v1/input/, where  is the API key you generated earlier​.

Please note that this method bypasses the Datadog Agent, which provides additional features such as automatic tagging and log scrubbing. If these features are important to you, you might want to consider running the Datadog Agent alongside your Odoo.sh instance.

Remember to replace  with your actual Datadog API key. Also, ensure that your logs do not contain any sensitive information before sending them to Datadog.


Avatar
Discard