Skip to main content

resolve_key_values

Function resolve_key_values 

Source
pub fn resolve_key_values(
    cli_key_values: &[(String, String)],
    skip_env: bool,
) -> Vec<(String, String)>
Expand description

Resolves merged key-value pairs for measurement commands by applying precedence:

  1. cli_key_values — highest priority (from –key-value / –metadata)
  2. [environment] section — env var lookup, first-found-wins for multi-source lists
  3. [defaults] section — static fallback values

When skip_env is true the [environment] section is ignored entirely. The config file is read and parsed only once regardless of which sections are present.