Skip to main content

apply_datadog_env_vars

Function apply_datadog_env_vars 

Source
pub fn apply_datadog_env_vars(
    base: &mut Value,
    vars: impl IntoIterator<Item = (String, String)>,
    overwrite: bool,
) -> Result<Vec<String>, String>
Expand description

Decodes supplied environment variables into modeled Datadog paths in base, and returns the name of each variable that supplied a key of [DATADOG_ENV_KEYS], as written in vars.

Also applies HTTP_PROXY/HTTPS_PROXY as fallbacks for their DD_ forms. When overwrite is true, environment values replace existing values; otherwise, only absent paths are filled. A variable that supplied a key is returned either way.

§Errors

Returns a message naming the environment variable when its value is malformed for the key’s declared shape. At startup this aborts the boot rather than silently dropping the value.