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

add support for DD_AGENT_HOST environment variable #208

Merged
merged 7 commits into from
Nov 13, 2018

Conversation

lucaspimentel
Copy link
Member

  • add support for DD_AGENT_HOST environment variable (while keeping a fallback for the old DD_TRACE_AGENT_HOSTNAME)

code clean-up:

  • make fields const or readonly where possible
  • rename fields to match conventions

@lucaspimentel lucaspimentel added type:enhancement Improvement to an existing feature area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) labels Nov 12, 2018
@lucaspimentel lucaspimentel added this to the 0.5.1-beta milestone Nov 12, 2018
@lucaspimentel lucaspimentel self-assigned this Nov 12, 2018
{
var prefixes = new string[] { "DD", "DATADOG" };
var host = TraceAgentHostEnvironmentVariableNames.Select(Environment.GetEnvironmentVariable)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice Linq usage 👍

@lucaspimentel lucaspimentel merged commit 409b2dc into develop Nov 13, 2018
@lucaspimentel lucaspimentel deleted the lpimentel/agent-env-vars branch November 13, 2018 18:18
lucaspimentel added a commit that referenced this pull request Nov 19, 2018
* add support for `DD_AGENT_HOST`, make some fields `const`, rename fields to match conventions

* call `GetAgentUri()` once and cache the result

* make another field `const`, reorder fields

* add unit tests

* restore original environment variables after unit test

* add comments

* add "DATADOG_" prefix as fallbacks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) type:enhancement Improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants