Understand the Difference Between the Agent Host and the Tracer Host

Overview

In Datadog APM, the host tag correlates spans and traces to infrastructure monitoring data, so host metrics are associated with hosts from spans and traces.

Datadog Agent vs. Tracer hostname

The Agent host is the host on which the Datadog Agent is running. The Tracer host is the host on which the application instrumented with the tracing library is running.

The Agent host and the Tracer host may differ based on how you deploy the Datadog Agent on your infrastructure:

When the Agent is deployed on the same host as the application (for example, using a DaemonSet), the Agent host and the Tracer host are the same.

Agent deployed on the same host as the application

When the Agent is deployed on a remote host, the Agent host is different from the Tracer host.

Agent deployed on a remote host, different from the application

When are the Tracer and Agent hosts set on spans?

  • The Datadog Agent hostname is always set on spans.
  • The Tracer hostname is set on spans if DD_TRACE_REPORT_HOSTNAME is true (default is false).
LanguageConfigEnvironment Variable
Rubytracing.report_hostnameDD_TRACE_REPORT_HOSTNAME
C++dd.trace.report-hostnameDD_TRACE_REPORT_HOSTNAME
Node.jsreportHostnameDD_TRACE_REPORT_HOSTNAME
Go-DD_TRACE_REPORT_HOSTNAME
Python-DD_TRACE_REPORT_HOSTNAME
PHPdatadog.trace.report_hostnameDD_TRACE_REPORT_HOSTNAME
Javadd.trace.report-hostnameDD_TRACE_REPORT_HOSTNAME

When does APM use host information?

APM uses host information when you create retention filters, generate metrics from spans, or create sensitive data scanner rules using host tag filters in queries. For example, host tag filters like availability-zone and cluster-name are enriched from the Datadog Agent host information.