|
179 | 179 | # String. Default: non |
180 | 180 | # $apm_non_local_traffic |
181 | 181 | # Accept non local apm traffic. Defaults to false. |
| 182 | +# Boolean. Default: false |
| 183 | +# $apm_analyzed_spans |
| 184 | +# Hash defining the APM spans to analyze and their rates. |
| 185 | +# Optional Hash. Default: undef. |
182 | 186 | # $process_enabled |
183 | 187 | # String to enable the process/container agent |
184 | 188 | # Boolean. Default: false |
|
297 | 301 | $apm_enabled = $datadog_agent::params::apm_default_enabled, |
298 | 302 | $apm_env = 'none', |
299 | 303 | $apm_non_local_traffic = false, |
| 304 | + Optional[Hash[String, Float[0, 1]]] $apm_analyzed_spans = undef, |
300 | 305 | $process_enabled = $datadog_agent::params::process_default_enabled, |
301 | 306 | $scrub_args = $datadog_agent::params::process_default_scrub_args, |
302 | 307 | $custom_sensitive_words = $datadog_agent::params::process_default_custom_words, |
|
491 | 496 | } |
492 | 497 |
|
493 | 498 | if $agent5_enable { |
| 499 | + |
494 | 500 | file { '/etc/dd-agent': |
495 | 501 | ensure => directory, |
496 | 502 | owner => $dd_user, |
|
553 | 559 | } |
554 | 560 | } |
555 | 561 |
|
556 | | - if ($apm_enabled == true) and ($apm_env != 'none') { |
| 562 | + if ($apm_enabled == true) and ($apm_env != 'none') or $apm_analyzed_spans { |
557 | 563 | concat::fragment{ 'datadog apm footer': |
558 | 564 | target => '/etc/dd-agent/datadog.conf', |
559 | 565 | content => template('datadog_agent/datadog_apm_footer.conf.erb'), |
|
611 | 617 | $host_config = {} |
612 | 618 | } |
613 | 619 |
|
| 620 | + if $apm_analyzed_spans { |
| 621 | + $apm_analyzed_span_config = { |
| 622 | + 'apm_config' => { |
| 623 | + 'apm_analyzed_spans' => $apm_analyzed_spans |
| 624 | + } |
| 625 | + } |
| 626 | + } else { |
| 627 | + $apm_analyzed_span_config = {} |
| 628 | + } |
| 629 | + |
614 | 630 | if $statsd_forward_host != '' { |
615 | 631 | if $_statsd_forward_port != '' { |
616 | 632 | $statsd_forward_config = { |
|
625 | 641 | } else { |
626 | 642 | $statsd_forward_config = {} |
627 | 643 | } |
628 | | - $extra_config = deep_merge($base_extra_config, $agent6_extra_options, $statsd_forward_config, $host_config) |
| 644 | + $extra_config = deep_merge( |
| 645 | + $base_extra_config, |
| 646 | + $agent6_extra_options, |
| 647 | + $apm_analyzed_span_config, |
| 648 | + $statsd_forward_config, |
| 649 | + $host_config) |
629 | 650 |
|
630 | 651 | file { $conf6_dir: |
631 | 652 | ensure => directory, |
|
0 commit comments