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

Allow to specify trace env #435

Merged
merged 1 commit into from May 5, 2017
Merged

Allow to specify trace env #435

merged 1 commit into from May 5, 2017

Conversation

krasnoukhov
Copy link
Contributor

@krasnoukhov krasnoukhov commented May 5, 2017

Our APM just recently started reporting to "env:none". Adding tags to a datadog.conf does not help for whatever reason. I noticed that configuring trace like this is missing from chef, so here we go.

https://app.datadoghq.com/apm/docs/tutorials/environments

@krasnoukhov krasnoukhov changed the title Alolow to specify trace env Allow to specify trace env May 5, 2017
@olivielpeau
Copy link
Member

Hi @krasnoukhov, thanks for adding this! Actually I just merged #433 and it conflicts with your PR unfortunately, could you rebase yours? (and maybe change the template condition to <% unless node['datadog']['trace_env'].nil? -%> to be consistent with #433, unless you think your condition makes more sense)

@krasnoukhov
Copy link
Contributor Author

@olivielpeau Done

Copy link
Member

@olivielpeau olivielpeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @krasnoukhov, one last thing to change and it should be good to merge

@@ -183,6 +183,11 @@ end
apm_enabled: <%= node['datadog']['enable_trace_agent'] %>
<% end -%>

[trace.config]
<% unless node['datadog']['trace_env'].nil? -%>
env = <%= node['datadog']['trace_env'] %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use env: instead of env = here? I know the 2 syntaxes should be similar in the ini format but still I'd rather be consistent with the other options

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah totally missed that. I copied the line from documentation initially, so that could be changed as well

@olivielpeau olivielpeau added this to the 2.10.0 milestone May 5, 2017
@olivielpeau
Copy link
Member

Thanks! Merging

@olivielpeau olivielpeau merged commit b8e5a72 into DataDog:master May 5, 2017
@krasnoukhov krasnoukhov deleted the trace-config branch May 5, 2017 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants