Search code examples
loggingdatadog

How we can delete the logs in DataDog using a search query?


I want to delete a set of logs under a specific Source. In Splunk, there is a delete command that we can use with search queries, as mentioned below:

index=myindex ... | head 100 | delete

Can we do the same in DataDog? or are there any alternative methods to do it ?


Solution

  • Datadog does not provide a direct mechanism to delete individual logs in its logging service. The logs are retained based on the configured retention policy.

    You can configure the retention policy in the Datadog UI under "Logs" > "Settings."