diff --git a/bottlecap/src/bin/bottlecap/main.rs b/bottlecap/src/bin/bottlecap/main.rs index 5b65f139d..a111ce9d8 100644 --- a/bottlecap/src/bin/bottlecap/main.rs +++ b/bottlecap/src/bin/bottlecap/main.rs @@ -24,7 +24,10 @@ use bottlecap::{ flusher::{build_fqdn_logs, Flusher as LogsFlusher}, }, secrets::decrypt, - tags::{lambda, provider::Provider as TagProvider}, + tags::{ + lambda::{self, tags::EXTENSION_VERSION}, + provider::Provider as TagProvider, + }, telemetry::{ self, client::TelemetryApiClient, @@ -101,7 +104,7 @@ enum NextEventResponse { }, } -async fn next_event(client: &reqwest::Client, ext_id: &str) -> Result { +async fn next_event(client: &Client, ext_id: &str) -> Result { let base_url = base_url(EXTENSION_ROUTE) .map_err(|e| Error::new(std::io::ErrorKind::InvalidData, e.to_string()))?; let url = format!("{base_url}/event/next"); @@ -136,7 +139,7 @@ async fn next_event(client: &reqwest::Client, ext_id: &str) -> Result Result { +async fn register(client: &Client) -> Result { let mut map = HashMap::new(); let base_url = base_url(EXTENSION_ROUTE) .map_err(|e| Error::new(std::io::ErrorKind::InvalidData, e.to_string()))?; @@ -185,7 +188,9 @@ async fn main() -> Result<()> { let (mut aws_config, config) = load_configs(); enable_logging_subsystem(&config); - let client = reqwest::Client::builder().no_proxy().build().map_err(|e| { + let version_without_next = EXTENSION_VERSION.split('-').next().unwrap_or("NA"); + debug!("Starting Datadog Extension {version_without_next}"); + let client = Client::builder().no_proxy().build().map_err(|e| { Error::new( std::io::ErrorKind::InvalidData, format!("Failed to create client: {e:?}"), diff --git a/bottlecap/src/tags/lambda/tags.rs b/bottlecap/src/tags/lambda/tags.rs index b553a15f9..43cd31c57 100644 --- a/bottlecap/src/tags/lambda/tags.rs +++ b/bottlecap/src/tags/lambda/tags.rs @@ -49,7 +49,7 @@ const FUNCTION_TAGS_KEY: &str = "_dd.tags.function"; // TODO(astuyve) decide what to do with the version const EXTENSION_VERSION_KEY: &str = "dd_extension_version"; // TODO(duncanista) figure out a better way to not hardcode this -const EXTENSION_VERSION: &str = "72-next"; +pub const EXTENSION_VERSION: &str = "72-next"; const REGION_KEY: &str = "region"; const ACCOUNT_ID_KEY: &str = "account_id"; diff --git a/scripts/build_binary_and_layer_dockerized.sh b/scripts/build_binary_and_layer_dockerized.sh index 3f5df53f1..de7a129c4 100755 --- a/scripts/build_binary_and_layer_dockerized.sh +++ b/scripts/build_binary_and_layer_dockerized.sh @@ -67,7 +67,6 @@ function docker_build_zip { arch=$1 suffix=$2 - DOCKER_BUILDKIT=1 docker buildx build --platform linux/${arch} \ -t datadog/build-lambda-extension-${arch}:$VERSION \ -f ./scripts/$BUILD_FILE \