Add interpolation of environment variables.#2095
Add interpolation of environment variables.#2095tyuio9 wants to merge 2 commits intoDataDog:masterfrom tyuio9:master
Conversation
|
Looks like the first problem was the Python 2.6.x syntax issue. Anyway, it should be fixed now. |
|
@mwolny We'll decide which direction we should go for 5.7.0 Thanks a lot! |
|
It would be really awesome to have such functionality as soon as possible. Seriously, it simplifies a lot. Is there any deadline or planned date for 5.7.0? |
|
@mwolny We're currently tracking 5.7 for January. |
|
Awesome, really happy to hear it! On Thu, Dec 17, 2015 at 11:05:06AM -0800, Ilan Rabinovitch wrote:
Marcin Wolny |
|
@mwolny can you describe a bit more your use case ? |
|
Sure. Nowadays I work with docker containers mostly. As you probably I also use enviroment variables for checks. But here I can take On Fri, Dec 18, 2015 at 10:50:11AM -0800, Remi Hakim wrote:
Marcin Wolny |
|
Thanks for the explanation. Can you describe where you'll be reading those settings from ? From what i can see, all environment variables starting with Thanks! |
|
This change allows you to use all environment variables starting with In other way, all environment variables starting with Is this answer your question? On Tue, Dec 22, 2015 at 08:11:48AM -0800, Remi Hakim wrote:
Marcin Wolny |
|
Looks like this change also introduces a problem with logging configuration. Basically the code creates ConfigParser object instance twice at two different places. This makes this path kind of unusable. |
|
Yes it does answer my question, thanks! You're right we initialize the config parser twice in the code. One for the logging config and one for the rest as we want to set up the logging as soon as possible. We should likely add the environment variable interpolation in the logging config set up code path as well. What do you think ? |
|
Actually I am just in the middle of creating change where |
This happens because ConfigParser object instance is created twice
at two different places.
|
This change still seems to require a change to For example, I usually only ever set |
Briefly the change allows to use all environment variables that begins with
DATADOG_inside the configuration file.