Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[trace-agent] Leave the default enabled/disabled behavior to the agent #433

Merged
merged 2 commits into from
May 5, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[trace-agent] Leave the default enabled/disabled behavior to the agent
Since agent 5.13.0, the trace agent is enabled by default.

This cookbook should allow explicitly enabling or disabling the trace
agent, however, when the attribute that controls this is not set, the
cookbook should leave it to the agent to decide whether to run the
trace agent.

This change modifies the default value of an attribute. Technically
this is a breaking change that requires a major version bump of the
cookbook, however I think this change actually improves backward
compatibility and can go with a minor version of the cookbook.
  • Loading branch information
olivielpeau committed May 4, 2017
commit ff9d5220057b10498df1368c69087d978cd33a97
6 changes: 5 additions & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,11 @@
default['datadog']['service_discovery_backend'] = nil

# Trace functionality settings
default['datadog']['enable_trace_agent'] = false
# Set `enable_trace_agent` to:
# * `true` to explicitly enable the trace agent and customize its settings
# * `false` to explicitly disable it
# Leave it to `nil` to let the agent's default behavior decide whether to run the trace-agent
default['datadog']['enable_trace_agent'] = nil
default['datadog']['extra_sample_rate'] = 1
default['datadog']['max_traces_per_second'] = 10
default['datadog']['receiver_port'] = 8126
Expand Down
2 changes: 1 addition & 1 deletion templates/default/datadog.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,6 @@ max_traces_per_second: <%= node['datadog']['max_traces_per_second'] %>
[trace.receiver]
receiver_port: <%= node['datadog']['receiver_port'] %>
connection_limit: <%= node['datadog']['connection_limit'] %>
<% else -%>
<% elsif node['datadog']['enable_trace_agent'] == false -%>
apm_enabled: false
<% end -%>