Skip to content

Commit a74da29

Browse files
committed
add support for configuring trace agent
With 5.11.0, there are additional sections in datadog.conf observed by the trace agent. But changing the semantics of `datadog_config` will break backwards compatibility with existing role users expecting that dictionary to populate the [Main] section. Instead, we add another nested dictionary to support extra sections.
1 parent 2015161 commit a74da29

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ Role Variables
1818

1919
- `datadog_api_key` - Your Datadog API key.
2020
- `datadog_checks` - YAML configuration for agent checks to drop into `/etc/dd-agent/conf.d`.
21-
- `datadog_config` - Settings to place in `/etc/dd-agent/datadog.conf`.
21+
- `datadog_config` - Settings to place in `/etc/dd-agent/datadog.conf` ini that go under `[Main]`.
22+
- `datadog_config_ex` - extra ini sections to go in `/etc/dd-agent/datadog.conf`.
2223
- `datadog_process_checks` - Array of process checks and options (DEPRECATED: use `process` under
2324
`datadog_checks` instead)
2425
- `datadog_apt_repo` - Override default Datadog `apt` repository
@@ -40,6 +41,11 @@ Example Playbooks
4041
datadog_config:
4142
tags: "mytag0, mytag1"
4243
log_level: INFO
44+
datadog_config_ex:
45+
trace.config:
46+
env: dev
47+
trace.concentrator:
48+
extra_aggregators: version
4349
datadog_checks:
4450
process:
4551
init_config:

templates/datadog.conf.j2

+7
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,10 @@
1616
{% if datadog_config -%}
1717
{{ datadog_config | to_nice_yaml }}
1818
{% endif %}
19+
20+
{% if datadog_config_ex is defined -%}
21+
{% for key, value in datadog_config_ex.iteritems() %}
22+
[{{ key }}]
23+
{{ value | to_nice_yaml }}
24+
{% endfor %}
25+
{% endif %}

0 commit comments

Comments
 (0)