Log Agent tags

Overview

The Datadog Agent automatically adds certain tags to all logs it collects before sending them to Datadog. These tags are added pre-ingestion, and are included in the payload that gets delivered to Datadog.

Pre-ingestion processing

Since these tags are added pre-ingestion, they:

  • Are included in all log data delivered to Datadog
  • Increase the overall size of your log data
  • Are available for filtering, searching, and aggregation in the Log Explorer
  • Can be used in log-based metrics and queries

Agent tags automatically added to logs

The following tags are automatically added to logs by the Datadog Agent:

TagDescriptionConditions
sourceThe source of the log (file path, integration name, etc.)Always when available
serviceThe service name if configured in the log collectionAlways when available
envThe environment tag if configured globallyAlways when available
versionThe Agent versionAlways when available
filenameBase name of the tailed fileFile-based sources only
dirnameDirectory containing the tailed fileFile-based sources only
source_hostIP address of the socket source hostSocket sources (TCP/UDP) only
event_typeType of the Windows eventWindows events only
event_sourceSource of the Windows eventWindows events only
event_idWindows Event IDWindows events only, if tag_event_id: true
sidWindows Security identifierWindows events only, if tag_sid: true
truncatedSource of truncationIf logs_config.tag_truncated_logs: true
multilineSource of multi-line aggregationIf logs_config.tag_multi_line_logs: true
aggregated_jsonIndicates that the log was aggregated from multiple JSON log entriesIf logs_config.auto_multi_line.tag_aggregated_json: true

Further reading