File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 151151# $pup_log_file
152152# Specifies the log file location for the pup system
153153# String. Default: empty
154- #
154+ # $apm_enabled
155+ # Boolean to enable or disable the trace agent
156+ # Boolean. Default: false
155157#
156158# Actions:
157159#
238240 $package_name = $datadog_agent::params::package_name,
239241 $dd_user = $datadog_agent::params::dd_user,
240242 $dd_group = $datadog_agent::params::dd_group,
243+ $apm_enabled = false ,
241244) inherits datadog_agent::params {
242245
243246 validate_string($dd_url )
298301 validate_string($sd_template_dir )
299302 validate_bool($sd_jmx_enable )
300303 validate_string($consul_token )
304+ validate_bool($apm_enabled )
301305
302306 if $hiera_tags {
303307 $local_tags = hiera_array(' datadog_agent::tags' )
Original file line number Diff line number Diff line change 203203 'content' => /^# sd_jmx_enable: no\n / ,
204204 ) }
205205 end
206+
207+ context 'for APM' do
208+ it { should contain_file ( '/etc/dd-agent/datadog.conf' ) . with (
209+ 'content' => /^apm_enabled: false\n / ,
210+ ) }
211+ end
206212 end
207213
208214 context 'with user provided paramaters' do
500506 'content' => /^syslog_port: 8080\n / ,
501507 ) }
502508 end
509+ context 'with apm_enabled set to true' do
510+ let ( :params ) { { :apm_enabled => true } }
511+ it { should contain_file ( '/etc/dd-agent/datadog.conf' ) . with (
512+ 'content' => /^apm_enabled: true\n / ,
513+ ) }
514+ end
503515 context 'with service_discovery enabled' do
504516 let ( :params ) {
505517 { :service_discovery_backend => 'docker' ,
Original file line number Diff line number Diff line change @@ -401,6 +401,11 @@ sd_jmx_enable: <%= @sd_jmx_enable %>
401401consul_token: <%= @consul_token %>
402402<% end -%>
403403
404+ # ========================================================================== #
405+ # Trace #
406+ # ========================================================================== #
407+
408+ apm_enabled: <%= @apm_enabled %>
404409
405410<% if not @extra_template.empty? -%>
406411
You can’t perform that action at this time.
0 commit comments