From 7a51416948d520fd8f0676ee0dc3eda7badefddf Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 28 Mar 2017 15:55:44 -0400 Subject: [PATCH] [datadog.conf] Fix `Main` section when `enable_trace_agent` is true (#419) --- templates/default/datadog.conf.erb | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/templates/default/datadog.conf.erb b/templates/default/datadog.conf.erb index 12490ba9..375f8deb 100644 --- a/templates/default/datadog.conf.erb +++ b/templates/default/datadog.conf.erb @@ -61,19 +61,6 @@ graphite_listen_port: <%= node['datadog']['graphite_port'] %> histogram_aggregates: <%= node['datadog']['histogram_aggregates'] %> histogram_percentiles: <%= node['datadog']['histogram_percentiles'] %> -<% if node['datadog']['enable_trace_agent'] == true -%> -## Trace settings -apm_enabled: true - -[trace.sampler] -extra_sample_rate: <%= node['datadog']['extra_sample_rate'] %> -max_traces_per_second: <%= node['datadog']['max_traces_per_second'] %> - -[trace.receiver] -receiver_port: <%= node['datadog']['receiver_port'] %> -connection_limit: <%= node['datadog']['connection_limit'] %> -<% end -%> - <% if node['datadog']['dogstatsd'] -%> # ========================================================================== # # DogStatsd configuration # @@ -164,3 +151,16 @@ end <% end -%> <% end -%> <% end -%> + +<% if node['datadog']['enable_trace_agent'] == true -%> +## Trace settings +apm_enabled: true + +[trace.sampler] +extra_sample_rate: <%= node['datadog']['extra_sample_rate'] %> +max_traces_per_second: <%= node['datadog']['max_traces_per_second'] %> + +[trace.receiver] +receiver_port: <%= node['datadog']['receiver_port'] %> +connection_limit: <%= node['datadog']['connection_limit'] %> +<% end -%>