1- use std:: time:: { Duration , Instant } ;
1+ use std:: {
2+ path:: PathBuf ,
3+ time:: { Duration , Instant } ,
4+ } ;
25
36use memory_accounting:: { ComponentBounds , ComponentRegistry } ;
47use saluki_app:: {
@@ -32,7 +35,9 @@ use tracing::{error, info, warn};
3235use crate :: env_provider:: ADPEnvironmentProvider ;
3336use crate :: internal:: { spawn_control_plane, spawn_internal_observability_topology} ;
3437
35- pub async fn run ( started : Instant , bootstrap_config : GenericConfiguration ) -> Result < ( ) , GenericError > {
38+ pub async fn run (
39+ started : Instant , bootstrap_config_path : PathBuf , bootstrap_config : GenericConfiguration ,
40+ ) -> Result < ( ) , GenericError > {
3641 let app_details = saluki_metadata:: get_app_details ( ) ;
3742 info ! (
3843 version = app_details. version( ) . raw( ) ,
@@ -58,6 +63,8 @@ pub async fn run(started: Instant, bootstrap_config: GenericConfiguration) -> Re
5863 // configuration source, but with environment variables on top of that to allow for ADP-specific overriding: log
5964 // level, etc.
6065 let dynamic_config = ConfigurationLoader :: default ( )
66+ . from_yaml ( & bootstrap_config_path)
67+ . error_context ( "Failed to load Datadog Agent configuration file." ) ?
6168 . with_dynamic_configuration ( config_updates_receiver)
6269 . from_environment ( crate :: internal:: platform:: DATADOG_AGENT_ENV_VAR_PREFIX ) ?
6370 . with_default_secrets_resolution ( )
0 commit comments