From 6b8129b8471b7a4626f2cf3b7ababb0e008e30f3 Mon Sep 17 00:00:00 2001 From: Jules Wiriath Date: Wed, 15 Jul 2026 13:58:10 +0200 Subject: [PATCH 1/5] feat: added env capability --- Cargo.lock | 78 +++++++++--------------- crates/capabilities/Cargo.toml | 6 +- crates/capabilities/src/env.rs | 49 +++++++++++++++ crates/capabilities/src/env_transport.js | 13 ++++ crates/capabilities/src/lib.rs | 33 +++++++--- crates/library_config/Cargo.toml | 2 +- crates/pipeline/Cargo.toml | 16 +++-- crates/process_discovery/Cargo.toml | 7 +-- eslint.config.js | 6 +- test/env-transport.js | 37 +++++++++++ yarn.lock | 6 +- 11 files changed, 170 insertions(+), 83 deletions(-) create mode 100644 crates/capabilities/src/env.rs create mode 100644 crates/capabilities/src/env_transport.js create mode 100644 test/env-transport.js diff --git a/Cargo.lock b/Cargo.lock index 22d8213..1de46a7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -890,7 +890,7 @@ checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] name = "libdatadog-nodejs-capabilities" -version = "0.1.0" +version = "0.2.0" dependencies = [ "anyhow", "bytes", @@ -917,7 +917,7 @@ dependencies = [ [[package]] name = "libdd-capabilities" version = "2.1.0" -source = "git+https://github.com/DataDog/libdatadog.git?rev=8cd68ab922fb7aade0f089ccfc91291d874673af#8cd68ab922fb7aade0f089ccfc91291d874673af" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" dependencies = [ "anyhow", "bytes", @@ -941,8 +941,9 @@ dependencies = [ [[package]] name = "libdd-capabilities-impl" version = "3.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?rev=8cd68ab922fb7aade0f089ccfc91291d874673af#8cd68ab922fb7aade0f089ccfc91291d874673af" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" dependencies = [ + "anyhow", "bytes", "http", "http-body-util", @@ -989,7 +990,7 @@ dependencies = [ [[package]] name = "libdd-common" version = "5.1.0" -source = "git+https://github.com/DataDog/libdatadog.git?rev=8cd68ab922fb7aade0f089ccfc91291d874673af#8cd68ab922fb7aade0f089ccfc91291d874673af" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" dependencies = [ "anyhow", "bytes", @@ -1052,7 +1053,7 @@ dependencies = [ [[package]] name = "libdd-data-pipeline" version = "7.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?rev=8cd68ab922fb7aade0f089ccfc91291d874673af#8cd68ab922fb7aade0f089ccfc91291d874673af" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" dependencies = [ "anyhow", "arc-swap", @@ -1070,7 +1071,7 @@ dependencies = [ "libdd-shared-runtime 2.0.0", "libdd-tinybytes", "libdd-trace-normalization", - "libdd-trace-protobuf 4.0.0", + "libdd-trace-protobuf", "libdd-trace-stats", "libdd-trace-utils", "rmp-serde", @@ -1094,7 +1095,7 @@ dependencies = [ [[package]] name = "libdd-ddsketch" version = "1.1.0" -source = "git+https://github.com/DataDog/libdatadog.git?rev=8cd68ab922fb7aade0f089ccfc91291d874673af#8cd68ab922fb7aade0f089ccfc91291d874673af" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" dependencies = [ "prost", ] @@ -1102,7 +1103,7 @@ dependencies = [ [[package]] name = "libdd-dogstatsd-client" version = "4.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?rev=8cd68ab922fb7aade0f089ccfc91291d874673af#8cd68ab922fb7aade0f089ccfc91291d874673af" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" dependencies = [ "anyhow", "cadence", @@ -1114,26 +1115,12 @@ dependencies = [ [[package]] name = "libdd-library-config" -version = "1.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?rev=353134770b312b7ccd2df6afabc253090b948e5f#353134770b312b7ccd2df6afabc253090b948e5f" -dependencies = [ - "anyhow", - "memfd", - "rand", - "rmp", - "rmp-serde", - "serde", - "serde_yaml", -] - -[[package]] -name = "libdd-library-config" -version = "2.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?rev=7cdeb7896e92d1ba38bde495934e112dac2eda25#7cdeb7896e92d1ba38bde495934e112dac2eda25" +version = "3.0.0" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" dependencies = [ "anyhow", "libc", - "libdd-trace-protobuf 3.0.2", + "libdd-trace-protobuf", "memfd", "prost", "rand", @@ -1174,7 +1161,7 @@ dependencies = [ [[package]] name = "libdd-shared-runtime" version = "2.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?rev=8cd68ab922fb7aade0f089ccfc91291d874673af#8cd68ab922fb7aade0f089ccfc91291d874673af" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" dependencies = [ "async-trait", "futures", @@ -1218,7 +1205,7 @@ dependencies = [ [[package]] name = "libdd-tinybytes" version = "1.1.1" -source = "git+https://github.com/DataDog/libdatadog.git?rev=8cd68ab922fb7aade0f089ccfc91291d874673af#8cd68ab922fb7aade0f089ccfc91291d874673af" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" dependencies = [ "serde", ] @@ -1226,21 +1213,21 @@ dependencies = [ [[package]] name = "libdd-trace-normalization" version = "3.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?rev=8cd68ab922fb7aade0f089ccfc91291d874673af#8cd68ab922fb7aade0f089ccfc91291d874673af" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" dependencies = [ "anyhow", - "libdd-trace-protobuf 4.0.0", + "libdd-trace-protobuf", ] [[package]] name = "libdd-trace-obfuscation" version = "5.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?rev=8cd68ab922fb7aade0f089ccfc91291d874673af#8cd68ab922fb7aade0f089ccfc91291d874673af" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" dependencies = [ "anyhow", "fluent-uri", "libdd-common 5.1.0", - "libdd-trace-protobuf 4.0.0", + "libdd-trace-protobuf", "libdd-trace-utils", "log", "percent-encoding", @@ -1248,20 +1235,10 @@ dependencies = [ "serde_json", ] -[[package]] -name = "libdd-trace-protobuf" -version = "3.0.2" -source = "git+https://github.com/DataDog/libdatadog.git?rev=7cdeb7896e92d1ba38bde495934e112dac2eda25#7cdeb7896e92d1ba38bde495934e112dac2eda25" -dependencies = [ - "prost", - "serde", - "serde_bytes", -] - [[package]] name = "libdd-trace-protobuf" version = "4.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?rev=8cd68ab922fb7aade0f089ccfc91291d874673af#8cd68ab922fb7aade0f089ccfc91291d874673af" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" dependencies = [ "prost", "serde", @@ -1271,7 +1248,7 @@ dependencies = [ [[package]] name = "libdd-trace-stats" version = "6.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?rev=8cd68ab922fb7aade0f089ccfc91291d874673af#8cd68ab922fb7aade0f089ccfc91291d874673af" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" dependencies = [ "anyhow", "arc-swap", @@ -1286,7 +1263,7 @@ dependencies = [ "libdd-dogstatsd-client", "libdd-shared-runtime 2.0.0", "libdd-trace-obfuscation", - "libdd-trace-protobuf 4.0.0", + "libdd-trace-protobuf", "libdd-trace-utils", "rmp-serde", "serde", @@ -1298,7 +1275,7 @@ dependencies = [ [[package]] name = "libdd-trace-utils" version = "9.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?rev=8cd68ab922fb7aade0f089ccfc91291d874673af#8cd68ab922fb7aade0f089ccfc91291d874673af" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" dependencies = [ "anyhow", "base64", @@ -1310,12 +1287,13 @@ dependencies = [ "http-body", "http-body-util", "indexmap", + "itoa", "libdd-capabilities 2.1.0", "libdd-capabilities-impl 3.0.0", "libdd-common 5.1.0", "libdd-tinybytes", "libdd-trace-normalization", - "libdd-trace-protobuf 4.0.0", + "libdd-trace-protobuf", "prost", "rand", "rmp", @@ -1352,7 +1330,7 @@ version = "0.2.0" dependencies = [ "anyhow", "getrandom 0.2.17", - "libdd-library-config 1.0.0", + "libdd-library-config", "serde", "serde-wasm-bindgen", "wasm-bindgen", @@ -1806,7 +1784,7 @@ dependencies = [ "libdd-common 5.1.0", "libdd-data-pipeline", "libdd-shared-runtime 2.0.0", - "libdd-trace-protobuf 4.0.0", + "libdd-trace-protobuf", "libdd-trace-stats", "libdd-trace-utils", "rmp-serde", @@ -1866,8 +1844,8 @@ name = "process-discovery" version = "0.1.0" dependencies = [ "anyhow", - "libdd-library-config 2.0.0", - "libdd-trace-protobuf 3.0.2", + "libdd-library-config", + "libdd-trace-protobuf", "napi", "napi-derive", ] diff --git a/crates/capabilities/Cargo.toml b/crates/capabilities/Cargo.toml index cbb376e..2bdefeb 100644 --- a/crates/capabilities/Cargo.toml +++ b/crates/capabilities/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libdatadog-nodejs-capabilities" -version = "0.1.0" +version = "0.2.0" edition = "2021" description = "Wasm capability implementations for libdatadog-nodejs (backed by JS transports)" @@ -15,9 +15,7 @@ http = "1" bytes = "1.4" futures-core = "0.3" anyhow = "1" -# TODO: Replace this temporary libdatadog PR rev with the official release/tag -# that contains DataDog/libdatadog#2235, then regenerate Cargo.lock. -libdd-capabilities = { git = "https://github.com/DataDog/libdatadog.git", rev = "8cd68ab922fb7aade0f089ccfc91291d874673af" } +libdd-capabilities = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps" } [dev-dependencies] wasm-bindgen-test = "0.3" diff --git a/crates/capabilities/src/env.rs b/crates/capabilities/src/env.rs new file mode 100644 index 0000000..a60fa85 --- /dev/null +++ b/crates/capabilities/src/env.rs @@ -0,0 +1,49 @@ +// Copyright 2026-Present Datadog, Inc. https://www.datadoghq.com/ +// SPDX-License-Identifier: Apache-2.0 + +//! Wasm implementation of [`EnvCapability`] backed by Node.js `process.env`. + +use wasm_bindgen::prelude::*; + +use libdd_capabilities::env::{EnvCapability, EnvError}; + +#[wasm_bindgen(module = "/src/env_transport.js")] +extern "C" { + #[wasm_bindgen(js_name = "get")] + fn js_env_get(name: &str) -> JsValue; + + #[wasm_bindgen(js_name = "set")] + fn js_env_set(name: &str, value: &str); + + #[wasm_bindgen(js_name = "unset")] + fn js_env_unset(name: &str); +} + +#[derive(Debug, Clone)] +pub struct WasmEnvCapability; + +impl EnvCapability for WasmEnvCapability { + fn new() -> Self { + Self + } + + fn get(&self, name: &str) -> Result, EnvError> { + // Node coerces every process.env value to a string, so NotUnicode is unreachable here. + let value = js_env_get(name); + if value.is_undefined() || value.is_null() { + Ok(None) + } else { + Ok(value.as_string()) + } + } + + fn set(&self, name: &str, value: &str) -> Result<(), EnvError> { + js_env_set(name, value); + Ok(()) + } + + fn unset(&self, name: &str) -> Result<(), EnvError> { + js_env_unset(name); + Ok(()) + } +} diff --git a/crates/capabilities/src/env_transport.js b/crates/capabilities/src/env_transport.js new file mode 100644 index 0000000..da79bc0 --- /dev/null +++ b/crates/capabilities/src/env_transport.js @@ -0,0 +1,13 @@ +'use strict' + +module.exports.get = function (name) { + return process.env[name] +} + +module.exports.set = function (name, value) { + process.env[name] = value +} + +module.exports.unset = function (name) { + delete process.env[name] +} diff --git a/crates/capabilities/src/lib.rs b/crates/capabilities/src/lib.rs index f7cb4b0..e5b5e37 100644 --- a/crates/capabilities/src/lib.rs +++ b/crates/capabilities/src/lib.rs @@ -12,12 +12,15 @@ use std::future::Future; use std::time::Duration; +use libdd_capabilities::env::{EnvCapability, EnvError}; use libdd_capabilities::http::HttpError; use libdd_capabilities::{HttpClientCapability, LogWriterCapability, MaybeSend, SleepCapability}; +pub mod env; pub mod http; pub mod sleep; +pub use env::WasmEnvCapability; pub use http::WasmHttpClient; pub use sleep::WasmSleepCapability; @@ -33,6 +36,7 @@ pub use sleep::WasmSleepCapability; pub struct WasmCapabilities { http: WasmHttpClient, sleep: WasmSleepCapability, + env: WasmEnvCapability, } impl Default for WasmCapabilities { @@ -46,16 +50,14 @@ impl WasmCapabilities { Self { http: WasmHttpClient::new_client(), sleep: WasmSleepCapability, + env: WasmEnvCapability, } } } impl HttpClientCapability for WasmCapabilities { fn new_client() -> Self { - Self { - http: WasmHttpClient::new_client(), - sleep: WasmSleepCapability, - } + Self::new() } fn request( @@ -68,10 +70,7 @@ impl HttpClientCapability for WasmCapabilities { impl SleepCapability for WasmCapabilities { fn new() -> Self { - Self { - http: WasmHttpClient::new_client(), - sleep: WasmSleepCapability, - } + Self::new() } fn sleep(&self, duration: Duration) -> impl Future + MaybeSend { @@ -89,3 +88,21 @@ impl LogWriterCapability for WasmCapabilities { Ok(()) } } + +impl EnvCapability for WasmCapabilities { + fn new() -> Self { + Self::new() + } + + fn get(&self, name: &str) -> Result, EnvError> { + self.env.get(name) + } + + fn set(&self, name: &str, value: &str) -> Result<(), EnvError> { + self.env.set(name, value) + } + + fn unset(&self, name: &str) -> Result<(), EnvError> { + self.env.unset(name) + } +} diff --git a/crates/library_config/Cargo.toml b/crates/library_config/Cargo.toml index be76bd4..a4f47cc 100644 --- a/crates/library_config/Cargo.toml +++ b/crates/library_config/Cargo.toml @@ -8,7 +8,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] anyhow = "1" -libdd-library-config = { git = "https://github.com/DataDog/libdatadog.git", rev = "353134770b312b7ccd2df6afabc253090b948e5f" } +libdd-library-config = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps" } wasm-bindgen = "0.2.100" serde = { version = "1.0", features = ["derive"] } diff --git a/crates/pipeline/Cargo.toml b/crates/pipeline/Cargo.toml index f8e318a..f884212 100644 --- a/crates/pipeline/Cargo.toml +++ b/crates/pipeline/Cargo.toml @@ -14,15 +14,13 @@ js-sys = "0.3" serde = { version = "1.0", features = ["derive"] } serde_json = "1" libdatadog-nodejs-capabilities = { path = "../capabilities" } -# TODO: Replace these temporary libdatadog PR revs with the official release/tag -# that contains DataDog/libdatadog#2235, then regenerate Cargo.lock. -libdd-capabilities = { git = "https://github.com/DataDog/libdatadog.git", rev = "8cd68ab922fb7aade0f089ccfc91291d874673af" } -libdd-common = { git = "https://github.com/DataDog/libdatadog.git", rev = "8cd68ab922fb7aade0f089ccfc91291d874673af", default-features = false } -libdd-data-pipeline = { git = "https://github.com/DataDog/libdatadog.git", rev = "8cd68ab922fb7aade0f089ccfc91291d874673af", default-features = false } -libdd-trace-utils = { git = "https://github.com/DataDog/libdatadog.git", rev = "8cd68ab922fb7aade0f089ccfc91291d874673af", default-features = false, features = ["change-buffer"] } -libdd-trace-stats = { git = "https://github.com/DataDog/libdatadog.git", rev = "8cd68ab922fb7aade0f089ccfc91291d874673af", default-features = false } -libdd-trace-protobuf = { git = "https://github.com/DataDog/libdatadog.git", rev = "8cd68ab922fb7aade0f089ccfc91291d874673af", default-features = false } -libdd-shared-runtime = { git = "https://github.com/DataDog/libdatadog.git", rev = "8cd68ab922fb7aade0f089ccfc91291d874673af", default-features = false } +libdd-capabilities = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps" } +libdd-common = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps", default-features = false } +libdd-data-pipeline = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps", default-features = false } +libdd-trace-utils = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps", default-features = false, features = ["change-buffer"] } +libdd-trace-stats = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps", default-features = false } +libdd-trace-protobuf = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps", default-features = false } +libdd-shared-runtime = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps", default-features = false } rmp-serde = "1" bytes = "1" http = "1" diff --git a/crates/process_discovery/Cargo.toml b/crates/process_discovery/Cargo.toml index 4404228..30c0fa2 100644 --- a/crates/process_discovery/Cargo.toml +++ b/crates/process_discovery/Cargo.toml @@ -8,11 +8,8 @@ crate-type = ["cdylib", "rlib"] [dependencies] anyhow = "1" -# Pointed at the merge commit that introduced ThreadLocalMetadata (caller-supplied -# schema version + extra process-context attributes). Swap back to a tagged release -# once one that includes 7cdeb7896e92d1ba38bde495934e112dac2eda25 is published. -libdd-library-config = { git = "https://github.com/DataDog/libdatadog.git", rev = "7cdeb7896e92d1ba38bde495934e112dac2eda25", features = ["otel-thread-ctx"] } -libdd-trace-protobuf = { git = "https://github.com/DataDog/libdatadog.git", rev = "7cdeb7896e92d1ba38bde495934e112dac2eda25" } +libdd-library-config = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps", features = ["otel-thread-ctx"] } +libdd-trace-protobuf = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps" } napi = { version = "2" } napi-derive = { version = "2", default-features = false } diff --git a/eslint.config.js b/eslint.config.js index e7b6736..690debf 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -80,9 +80,9 @@ module.exports = [ }, }, { - // Loaded by Rust via `wasm_bindgen(module = ".../http_transport.js")`, so the - // snake_case filename must match the Rust module path. - files: ['**/http_transport.js'], + // Loaded by Rust via `wasm_bindgen(module = ".../_transport.js")`, so + // the snake_case filename must match the Rust module path. + files: ['**/*_transport.js'], rules: { 'unicorn/filename-case': 'off', }, diff --git a/test/env-transport.js b/test/env-transport.js new file mode 100644 index 0000000..f7a82f6 --- /dev/null +++ b/test/env-transport.js @@ -0,0 +1,37 @@ +'use strict' + +// The transport shim is plain CommonJS, so drive it directly. + +const { describe, it, before, after } = require('node:test') +const assert = require('node:assert') + +const envTransport = require('../crates/capabilities/src/env_transport') + +describe('env_transport', () => { + const NAME = 'LIBDD_CAP_TEST_ENV_TRANSPORT' + let savedValue + + before(() => { + savedValue = process.env[NAME] + }) + after(() => { + if (savedValue === undefined) delete process.env[NAME] + else process.env[NAME] = savedValue + }) + + it('returns undefined for an unset var', () => { + delete process.env[NAME] + assert.strictEqual(envTransport.get(NAME), undefined) + }) + + it('set then get round-trips the value', () => { + envTransport.set(NAME, 'value1') + assert.strictEqual(envTransport.get(NAME), 'value1') + }) + + it('unset then get returns undefined', () => { + envTransport.set(NAME, 'value2') + envTransport.unset(NAME) + assert.strictEqual(envTransport.get(NAME), undefined) + }) +}) diff --git a/yarn.lock b/yarn.lock index 14dca93..85f5c9f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -280,7 +280,7 @@ baseline-browser-mapping@^2.9.0: resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.10.0.tgz#5b09935025bf8a80e29130251e337c6a7fc8cbb9" integrity sha512-lIyg0szRfYbiy67j9KN8IyeD7q7hcmqnJ1ddWmNt19ItGpNN64mnllmxUNFIOdOm6by97jlL6wfpTTJrmnjWAA== -brace-expansion@^5.0.2, brace-expansion@^5.0.6: +brace-expansion@^5.0.2: version "5.0.6" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-5.0.6.tgz#ec68fe0a641a29d8711579caf641d05bae1f2285" integrity sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g== @@ -608,7 +608,7 @@ flat-cache@^4.0.0: flatted "^3.2.9" keyv "^4.5.4" -flatted@^3.2.9, flatted@^3.4.2: +flatted@^3.2.9: version "3.4.2" resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.4.2.tgz#f5c23c107f0f37de8dbdf24f13722b3b98d52726" integrity sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA== @@ -801,7 +801,7 @@ picocolors@^1.1.1: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== -picomatch@^4.0.2, picomatch@^4.0.3, picomatch@^4.0.4: +picomatch@^4.0.2, picomatch@^4.0.3: version "4.0.4" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.4.tgz#fd6f5e00a143086e074dffe4c924b8fb293b0589" integrity sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A== From 605f09fa634736d950af15dd4b49c3cab278e2ec Mon Sep 17 00:00:00 2001 From: Jules Wiriath Date: Thu, 16 Jul 2026 11:52:11 +0200 Subject: [PATCH 2/5] feat: respect envcapabilities method unsafedness --- crates/capabilities/src/env.rs | 6 ++++-- crates/capabilities/src/lib.rs | 10 ++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/crates/capabilities/src/env.rs b/crates/capabilities/src/env.rs index a60fa85..c5c99ae 100644 --- a/crates/capabilities/src/env.rs +++ b/crates/capabilities/src/env.rs @@ -37,12 +37,14 @@ impl EnvCapability for WasmEnvCapability { } } - fn set(&self, name: &str, value: &str) -> Result<(), EnvError> { + unsafe fn set(&self, name: &str, value: &str) -> Result<(), EnvError> { + // SAFETY: Wasm is single-threaded; no concurrent env access is possible. js_env_set(name, value); Ok(()) } - fn unset(&self, name: &str) -> Result<(), EnvError> { + unsafe fn unset(&self, name: &str) -> Result<(), EnvError> { + // SAFETY: Wasm is single-threaded; no concurrent env access is possible. js_env_unset(name); Ok(()) } diff --git a/crates/capabilities/src/lib.rs b/crates/capabilities/src/lib.rs index e5b5e37..775547a 100644 --- a/crates/capabilities/src/lib.rs +++ b/crates/capabilities/src/lib.rs @@ -98,11 +98,13 @@ impl EnvCapability for WasmCapabilities { self.env.get(name) } - fn set(&self, name: &str, value: &str) -> Result<(), EnvError> { - self.env.set(name, value) + unsafe fn set(&self, name: &str, value: &str) -> Result<(), EnvError> { + // SAFETY: forwarded verbatim; Wasm is single-threaded so the precondition is trivially upheld. + unsafe { self.env.set(name, value) } } - fn unset(&self, name: &str) -> Result<(), EnvError> { - self.env.unset(name) + unsafe fn unset(&self, name: &str) -> Result<(), EnvError> { + // SAFETY: forwarded verbatim; Wasm is single-threaded so the precondition is trivially upheld. + unsafe { self.env.unset(name) } } } From 8594f5984a6e9ef1c16b78a2bebdbad118195ebf Mon Sep 17 00:00:00 2001 From: Jules Wiriath Date: Thu, 16 Jul 2026 13:25:20 +0200 Subject: [PATCH 3/5] feat: validate before saying it's ok --- crates/capabilities/src/env.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/capabilities/src/env.rs b/crates/capabilities/src/env.rs index c5c99ae..51bff88 100644 --- a/crates/capabilities/src/env.rs +++ b/crates/capabilities/src/env.rs @@ -5,7 +5,7 @@ use wasm_bindgen::prelude::*; -use libdd_capabilities::env::{EnvCapability, EnvError}; +use libdd_capabilities::env::{validate_name, validate_value, EnvCapability, EnvError}; #[wasm_bindgen(module = "/src/env_transport.js")] extern "C" { @@ -38,12 +38,15 @@ impl EnvCapability for WasmEnvCapability { } unsafe fn set(&self, name: &str, value: &str) -> Result<(), EnvError> { + validate_name(name)?; + validate_value(value)?; // SAFETY: Wasm is single-threaded; no concurrent env access is possible. js_env_set(name, value); Ok(()) } unsafe fn unset(&self, name: &str) -> Result<(), EnvError> { + validate_name(name)?; // SAFETY: Wasm is single-threaded; no concurrent env access is possible. js_env_unset(name); Ok(()) From 04c76789e81d0fbf712d8954284c09a4682b7f08 Mon Sep 17 00:00:00 2001 From: Jules Wiriath Date: Thu, 16 Jul 2026 16:24:42 +0200 Subject: [PATCH 4/5] revert: remove set/unset since they would be dangerous APIs in libdatadog (and are most likely not useful in the near/middel future in dd-trace-js) --- Cargo.lock | 30 ++++++++++++------------ crates/capabilities/src/env.rs | 23 +----------------- crates/capabilities/src/env_transport.js | 8 ------- crates/capabilities/src/lib.rs | 10 -------- test/env-transport.js | 10 ++------ 5 files changed, 18 insertions(+), 63 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1de46a7..86f05a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -917,7 +917,7 @@ dependencies = [ [[package]] name = "libdd-capabilities" version = "2.1.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" dependencies = [ "anyhow", "bytes", @@ -941,7 +941,7 @@ dependencies = [ [[package]] name = "libdd-capabilities-impl" version = "3.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" dependencies = [ "anyhow", "bytes", @@ -990,7 +990,7 @@ dependencies = [ [[package]] name = "libdd-common" version = "5.1.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" dependencies = [ "anyhow", "bytes", @@ -1053,7 +1053,7 @@ dependencies = [ [[package]] name = "libdd-data-pipeline" version = "7.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" dependencies = [ "anyhow", "arc-swap", @@ -1095,7 +1095,7 @@ dependencies = [ [[package]] name = "libdd-ddsketch" version = "1.1.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" dependencies = [ "prost", ] @@ -1103,7 +1103,7 @@ dependencies = [ [[package]] name = "libdd-dogstatsd-client" version = "4.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" dependencies = [ "anyhow", "cadence", @@ -1116,7 +1116,7 @@ dependencies = [ [[package]] name = "libdd-library-config" version = "3.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" dependencies = [ "anyhow", "libc", @@ -1161,7 +1161,7 @@ dependencies = [ [[package]] name = "libdd-shared-runtime" version = "2.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" dependencies = [ "async-trait", "futures", @@ -1205,7 +1205,7 @@ dependencies = [ [[package]] name = "libdd-tinybytes" version = "1.1.1" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" dependencies = [ "serde", ] @@ -1213,7 +1213,7 @@ dependencies = [ [[package]] name = "libdd-trace-normalization" version = "3.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" dependencies = [ "anyhow", "libdd-trace-protobuf", @@ -1222,7 +1222,7 @@ dependencies = [ [[package]] name = "libdd-trace-obfuscation" version = "5.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" dependencies = [ "anyhow", "fluent-uri", @@ -1238,7 +1238,7 @@ dependencies = [ [[package]] name = "libdd-trace-protobuf" version = "4.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" dependencies = [ "prost", "serde", @@ -1248,7 +1248,7 @@ dependencies = [ [[package]] name = "libdd-trace-stats" version = "6.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" dependencies = [ "anyhow", "arc-swap", @@ -1275,7 +1275,7 @@ dependencies = [ [[package]] name = "libdd-trace-utils" version = "9.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#27390d0d751258696048d6a22a009bedc13dfee8" +source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" dependencies = [ "anyhow", "base64", @@ -2094,7 +2094,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] diff --git a/crates/capabilities/src/env.rs b/crates/capabilities/src/env.rs index 51bff88..1cba7db 100644 --- a/crates/capabilities/src/env.rs +++ b/crates/capabilities/src/env.rs @@ -5,18 +5,12 @@ use wasm_bindgen::prelude::*; -use libdd_capabilities::env::{validate_name, validate_value, EnvCapability, EnvError}; +use libdd_capabilities::env::{EnvCapability, EnvError}; #[wasm_bindgen(module = "/src/env_transport.js")] extern "C" { #[wasm_bindgen(js_name = "get")] fn js_env_get(name: &str) -> JsValue; - - #[wasm_bindgen(js_name = "set")] - fn js_env_set(name: &str, value: &str); - - #[wasm_bindgen(js_name = "unset")] - fn js_env_unset(name: &str); } #[derive(Debug, Clone)] @@ -36,19 +30,4 @@ impl EnvCapability for WasmEnvCapability { Ok(value.as_string()) } } - - unsafe fn set(&self, name: &str, value: &str) -> Result<(), EnvError> { - validate_name(name)?; - validate_value(value)?; - // SAFETY: Wasm is single-threaded; no concurrent env access is possible. - js_env_set(name, value); - Ok(()) - } - - unsafe fn unset(&self, name: &str) -> Result<(), EnvError> { - validate_name(name)?; - // SAFETY: Wasm is single-threaded; no concurrent env access is possible. - js_env_unset(name); - Ok(()) - } } diff --git a/crates/capabilities/src/env_transport.js b/crates/capabilities/src/env_transport.js index da79bc0..414fd2a 100644 --- a/crates/capabilities/src/env_transport.js +++ b/crates/capabilities/src/env_transport.js @@ -3,11 +3,3 @@ module.exports.get = function (name) { return process.env[name] } - -module.exports.set = function (name, value) { - process.env[name] = value -} - -module.exports.unset = function (name) { - delete process.env[name] -} diff --git a/crates/capabilities/src/lib.rs b/crates/capabilities/src/lib.rs index 775547a..1933010 100644 --- a/crates/capabilities/src/lib.rs +++ b/crates/capabilities/src/lib.rs @@ -97,14 +97,4 @@ impl EnvCapability for WasmCapabilities { fn get(&self, name: &str) -> Result, EnvError> { self.env.get(name) } - - unsafe fn set(&self, name: &str, value: &str) -> Result<(), EnvError> { - // SAFETY: forwarded verbatim; Wasm is single-threaded so the precondition is trivially upheld. - unsafe { self.env.set(name, value) } - } - - unsafe fn unset(&self, name: &str) -> Result<(), EnvError> { - // SAFETY: forwarded verbatim; Wasm is single-threaded so the precondition is trivially upheld. - unsafe { self.env.unset(name) } - } } diff --git a/test/env-transport.js b/test/env-transport.js index f7a82f6..f45a377 100644 --- a/test/env-transport.js +++ b/test/env-transport.js @@ -24,14 +24,8 @@ describe('env_transport', () => { assert.strictEqual(envTransport.get(NAME), undefined) }) - it('set then get round-trips the value', () => { - envTransport.set(NAME, 'value1') + it('returns the value when the var is set', () => { + process.env[NAME] = 'value1' assert.strictEqual(envTransport.get(NAME), 'value1') }) - - it('unset then get returns undefined', () => { - envTransport.set(NAME, 'value2') - envTransport.unset(NAME) - assert.strictEqual(envTransport.get(NAME), undefined) - }) }) From 3f1babad738fe45f34c61d1fbd08b5a84b659b09 Mon Sep 17 00:00:00 2001 From: Jules Wiriath Date: Fri, 17 Jul 2026 11:48:32 +0200 Subject: [PATCH 5/5] chore: change input to main's commit that has the change --- Cargo.lock | 28 ++++++++++++++-------------- crates/capabilities/Cargo.toml | 2 +- crates/library_config/Cargo.toml | 2 +- crates/pipeline/Cargo.toml | 14 +++++++------- crates/process_discovery/Cargo.toml | 4 ++-- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 86f05a6..3dd82b5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -917,7 +917,7 @@ dependencies = [ [[package]] name = "libdd-capabilities" version = "2.1.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" +source = "git+https://github.com/DataDog/libdatadog.git?rev=0c6e2a5df2a163d34c4f385353ffc5d7257c72f4#0c6e2a5df2a163d34c4f385353ffc5d7257c72f4" dependencies = [ "anyhow", "bytes", @@ -941,7 +941,7 @@ dependencies = [ [[package]] name = "libdd-capabilities-impl" version = "3.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" +source = "git+https://github.com/DataDog/libdatadog.git?rev=0c6e2a5df2a163d34c4f385353ffc5d7257c72f4#0c6e2a5df2a163d34c4f385353ffc5d7257c72f4" dependencies = [ "anyhow", "bytes", @@ -990,7 +990,7 @@ dependencies = [ [[package]] name = "libdd-common" version = "5.1.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" +source = "git+https://github.com/DataDog/libdatadog.git?rev=0c6e2a5df2a163d34c4f385353ffc5d7257c72f4#0c6e2a5df2a163d34c4f385353ffc5d7257c72f4" dependencies = [ "anyhow", "bytes", @@ -1053,7 +1053,7 @@ dependencies = [ [[package]] name = "libdd-data-pipeline" version = "7.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" +source = "git+https://github.com/DataDog/libdatadog.git?rev=0c6e2a5df2a163d34c4f385353ffc5d7257c72f4#0c6e2a5df2a163d34c4f385353ffc5d7257c72f4" dependencies = [ "anyhow", "arc-swap", @@ -1095,7 +1095,7 @@ dependencies = [ [[package]] name = "libdd-ddsketch" version = "1.1.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" +source = "git+https://github.com/DataDog/libdatadog.git?rev=0c6e2a5df2a163d34c4f385353ffc5d7257c72f4#0c6e2a5df2a163d34c4f385353ffc5d7257c72f4" dependencies = [ "prost", ] @@ -1103,7 +1103,7 @@ dependencies = [ [[package]] name = "libdd-dogstatsd-client" version = "4.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" +source = "git+https://github.com/DataDog/libdatadog.git?rev=0c6e2a5df2a163d34c4f385353ffc5d7257c72f4#0c6e2a5df2a163d34c4f385353ffc5d7257c72f4" dependencies = [ "anyhow", "cadence", @@ -1116,7 +1116,7 @@ dependencies = [ [[package]] name = "libdd-library-config" version = "3.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" +source = "git+https://github.com/DataDog/libdatadog.git?rev=0c6e2a5df2a163d34c4f385353ffc5d7257c72f4#0c6e2a5df2a163d34c4f385353ffc5d7257c72f4" dependencies = [ "anyhow", "libc", @@ -1161,7 +1161,7 @@ dependencies = [ [[package]] name = "libdd-shared-runtime" version = "2.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" +source = "git+https://github.com/DataDog/libdatadog.git?rev=0c6e2a5df2a163d34c4f385353ffc5d7257c72f4#0c6e2a5df2a163d34c4f385353ffc5d7257c72f4" dependencies = [ "async-trait", "futures", @@ -1205,7 +1205,7 @@ dependencies = [ [[package]] name = "libdd-tinybytes" version = "1.1.1" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" +source = "git+https://github.com/DataDog/libdatadog.git?rev=0c6e2a5df2a163d34c4f385353ffc5d7257c72f4#0c6e2a5df2a163d34c4f385353ffc5d7257c72f4" dependencies = [ "serde", ] @@ -1213,7 +1213,7 @@ dependencies = [ [[package]] name = "libdd-trace-normalization" version = "3.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" +source = "git+https://github.com/DataDog/libdatadog.git?rev=0c6e2a5df2a163d34c4f385353ffc5d7257c72f4#0c6e2a5df2a163d34c4f385353ffc5d7257c72f4" dependencies = [ "anyhow", "libdd-trace-protobuf", @@ -1222,7 +1222,7 @@ dependencies = [ [[package]] name = "libdd-trace-obfuscation" version = "5.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" +source = "git+https://github.com/DataDog/libdatadog.git?rev=0c6e2a5df2a163d34c4f385353ffc5d7257c72f4#0c6e2a5df2a163d34c4f385353ffc5d7257c72f4" dependencies = [ "anyhow", "fluent-uri", @@ -1238,7 +1238,7 @@ dependencies = [ [[package]] name = "libdd-trace-protobuf" version = "4.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" +source = "git+https://github.com/DataDog/libdatadog.git?rev=0c6e2a5df2a163d34c4f385353ffc5d7257c72f4#0c6e2a5df2a163d34c4f385353ffc5d7257c72f4" dependencies = [ "prost", "serde", @@ -1248,7 +1248,7 @@ dependencies = [ [[package]] name = "libdd-trace-stats" version = "6.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" +source = "git+https://github.com/DataDog/libdatadog.git?rev=0c6e2a5df2a163d34c4f385353ffc5d7257c72f4#0c6e2a5df2a163d34c4f385353ffc5d7257c72f4" dependencies = [ "anyhow", "arc-swap", @@ -1275,7 +1275,7 @@ dependencies = [ [[package]] name = "libdd-trace-utils" version = "9.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?branch=jwiriath%2Fenv-caps#6b5cd46b9579aa1862ae444807360d044bb514fa" +source = "git+https://github.com/DataDog/libdatadog.git?rev=0c6e2a5df2a163d34c4f385353ffc5d7257c72f4#0c6e2a5df2a163d34c4f385353ffc5d7257c72f4" dependencies = [ "anyhow", "base64", diff --git a/crates/capabilities/Cargo.toml b/crates/capabilities/Cargo.toml index 2bdefeb..01398d0 100644 --- a/crates/capabilities/Cargo.toml +++ b/crates/capabilities/Cargo.toml @@ -15,7 +15,7 @@ http = "1" bytes = "1.4" futures-core = "0.3" anyhow = "1" -libdd-capabilities = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps" } +libdd-capabilities = { git = "https://github.com/DataDog/libdatadog.git", rev = "0c6e2a5df2a163d34c4f385353ffc5d7257c72f4" } [dev-dependencies] wasm-bindgen-test = "0.3" diff --git a/crates/library_config/Cargo.toml b/crates/library_config/Cargo.toml index a4f47cc..b6deab0 100644 --- a/crates/library_config/Cargo.toml +++ b/crates/library_config/Cargo.toml @@ -8,7 +8,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] anyhow = "1" -libdd-library-config = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps" } +libdd-library-config = { git = "https://github.com/DataDog/libdatadog.git", rev = "0c6e2a5df2a163d34c4f385353ffc5d7257c72f4" } wasm-bindgen = "0.2.100" serde = { version = "1.0", features = ["derive"] } diff --git a/crates/pipeline/Cargo.toml b/crates/pipeline/Cargo.toml index f884212..61b9e3c 100644 --- a/crates/pipeline/Cargo.toml +++ b/crates/pipeline/Cargo.toml @@ -14,13 +14,13 @@ js-sys = "0.3" serde = { version = "1.0", features = ["derive"] } serde_json = "1" libdatadog-nodejs-capabilities = { path = "../capabilities" } -libdd-capabilities = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps" } -libdd-common = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps", default-features = false } -libdd-data-pipeline = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps", default-features = false } -libdd-trace-utils = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps", default-features = false, features = ["change-buffer"] } -libdd-trace-stats = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps", default-features = false } -libdd-trace-protobuf = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps", default-features = false } -libdd-shared-runtime = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps", default-features = false } +libdd-capabilities = { git = "https://github.com/DataDog/libdatadog.git", rev = "0c6e2a5df2a163d34c4f385353ffc5d7257c72f4" } +libdd-common = { git = "https://github.com/DataDog/libdatadog.git", rev = "0c6e2a5df2a163d34c4f385353ffc5d7257c72f4", default-features = false } +libdd-data-pipeline = { git = "https://github.com/DataDog/libdatadog.git", rev = "0c6e2a5df2a163d34c4f385353ffc5d7257c72f4", default-features = false } +libdd-trace-utils = { git = "https://github.com/DataDog/libdatadog.git", rev = "0c6e2a5df2a163d34c4f385353ffc5d7257c72f4", default-features = false, features = ["change-buffer"] } +libdd-trace-stats = { git = "https://github.com/DataDog/libdatadog.git", rev = "0c6e2a5df2a163d34c4f385353ffc5d7257c72f4", default-features = false } +libdd-trace-protobuf = { git = "https://github.com/DataDog/libdatadog.git", rev = "0c6e2a5df2a163d34c4f385353ffc5d7257c72f4", default-features = false } +libdd-shared-runtime = { git = "https://github.com/DataDog/libdatadog.git", rev = "0c6e2a5df2a163d34c4f385353ffc5d7257c72f4", default-features = false } rmp-serde = "1" bytes = "1" http = "1" diff --git a/crates/process_discovery/Cargo.toml b/crates/process_discovery/Cargo.toml index 30c0fa2..32e9449 100644 --- a/crates/process_discovery/Cargo.toml +++ b/crates/process_discovery/Cargo.toml @@ -8,8 +8,8 @@ crate-type = ["cdylib", "rlib"] [dependencies] anyhow = "1" -libdd-library-config = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps", features = ["otel-thread-ctx"] } -libdd-trace-protobuf = { git = "https://github.com/DataDog/libdatadog.git", branch = "jwiriath/env-caps" } +libdd-library-config = { git = "https://github.com/DataDog/libdatadog.git", rev = "0c6e2a5df2a163d34c4f385353ffc5d7257c72f4", features = ["otel-thread-ctx"] } +libdd-trace-protobuf = { git = "https://github.com/DataDog/libdatadog.git", rev = "0c6e2a5df2a163d34c4f385353ffc5d7257c72f4" } napi = { version = "2" } napi-derive = { version = "2", default-features = false }