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

Enable to set Trace Environment via env-var #245

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

spesnova
Copy link

@spesnova spesnova commented Sep 29, 2017

What does this PR do?

Enable to set Trace Environment.

For example, when you add DD_TRACE_CONF_ENV=staging to docker-dd-agent container, new lines will be added in datadog.conf like this:

[trace.config]
env = staging

About implementation

I understand you manage configurations in datadog.conf by config_builder.py. At first I tried to modify the file. But it looks config_builder.py doesn't support trace conf currently. Then I modified entrypoint.sh instead of config_builder.py . I don't know this is right way. So I'd like to hear maintainers feedback.

Motivation

To allow docker-dd-agent users to set Trace Environment via environment variable.

I have multiple Kubernetes clusters such as "production", "staging". I run docker-dd-agent as daemonSets in each cluster. I have started to use Datadog APM on those cluster. To avoid to force each tracer to set "env" (because our development team is planning to deploy tons of services), I'd like to set it via trace agent. But currently it looks docker-dd-agent doesn't allow to set it via environment variable.

This change makes docker-dd-agent users to set Trace Environment
via environment variable.
For example, when you add `DD_TRACE_CONF_ENV=staging`, new lines
will be added in datadog.conf like this:

```
[trace.config]
env = staging
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant