-
Notifications
You must be signed in to change notification settings - Fork 395
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
[core] Allow DD_AGENT_HOST and DD_TRACE_AGENT_PORT env variables #708
Conversation
DEFAULT_HOSTNAME = environ.get('DATADOG_TRACE_AGENT_HOSTNAME', 'localhost') | ||
DEFAULT_PORT = 8126 | ||
DEFAULT_HOSTNAME = environ.get('DD_AGENT_HOST', environ.get('DATADOG_TRACE_AGENT_HOSTNAME', 'localhost')) | ||
DEFAULT_PORT = int(environ.get('DD_TRACE_AGENT_PORT', 8126)) |
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.
Do we have a test for this code path? Such as initializing a new tracer after setting the env vars without using ddtrace-run
?
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.
To prevent regressions we can add the test @palazzem suggested. Looks good otherwise.
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.
Let's add the missing test without ddtrace-run
and then we're ready to merge.
@palazzem I think if I understood what you were looking for correctly, I updated the tests to also run the same hostname check runner, but without using |
* [core] Allow DD_AGENT_HOST and DD_TRACE_AGENT_PORT env variables * [core] test different tracer port and running without ddtrace-run
To help support desired containerization onboarding improvements we need to support
DD_AGENT_HOST
andDD_TRACE_AGENT_PORT
environment variables for configuration.These changes are the minimal viable changes needed to support these variables. It isn't the most clean, using something like
get_env()
would be better, but we decided to get this out the door since @Kyle-Verhoog has a task to work on standardizing ourDD_*
variables.