It is not recommended to use the Agent for log collection only. Using metric collection ensures that your logs, metrics, and traces from the same host share the same hostname and therefore the same tags.
However, it is still possible to configure the Agent to only collect logs.
The Agent sends metrics and other payloads to Datadog. To make sure that the Agent only sends logs, it is possible to disable payloads sent by the Agent since the Agent version 6.4 with the following steps:
datadog.yamlfile (locate this configuration file for your platform).
enable_payloads attribute as below:
enable_payloads: series: false events: false service_checks: false sketches: false
Configure the Agent to collect logs as explained in the log documentation page.
Set the following environment variables to
DD_ENABLE_PAYLOADS_EVENTS DD_ENABLE_PAYLOADS_SERIES DD_ENABLE_PAYLOADS_SERVICE_CHECKS DD_ENABLE_PAYLOADS_SKETCHES
Then restart the Agent.
Additional helpful documentation, links, and articles: