-
Notifications
You must be signed in to change notification settings - Fork 189
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
add support for max_traces_per_second option to datadog.conf #291
add support for max_traces_per_second option to datadog.conf #291
Conversation
Can someone please take a look at this? Anything that needs to be done before it's approved/merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @joshuabaird ,
Sorry for the delay. The option name is indeed specific enough that prefixing it with trace_sampler
is not necessary.
I just have one comment about how you handled the missing trace.sampler
section, what do you think?
entrypoint.sh
Outdated
@@ -15,6 +15,7 @@ export DD_CONF_SUPERVISOR_SOCKET="/dev/shm/datadog-supervisor.sock" | |||
|
|||
|
|||
##### Core config ##### | |||
sed -i '/^#.* \[trace.sampler\]/s/^# //' ${DD_ETC_ROOT}/datadog.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding the section here, what do you think about patching set_property
in config_builder.py to do
if not self.config.has_section(section):
self.config.add_section(section)
See https://docs.python.org/2/library/configparser.html#ConfigParser.RawConfigParser.add_section
I do think failing in config_builder.py
because the section does not exist is a bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea - much better than my original hack. Done!
What does this PR do?
This PR does two things:
[trace.sampler]
section in the stockdatadog.conf
max_traces_per_second
configuration option todatadog.conf
This allows a user to configure this value by setting the
MAX_TRACES_PER_SECOND
environment variable.Motivation
We are heavy users of APM. We require a higher
max_traces_per_second
than what the default provides (10).What inspired you to submit this pull request?
The inability to configure
max_traces_per_second
via an environment variable.