From b3e823013f3f9abbf64c2b15b4c4085852d7ecf1 Mon Sep 17 00:00:00 2001 From: moezein0 <169095174+moezein0@users.noreply.github.com> Date: Mon, 22 Jun 2026 09:53:38 -0400 Subject: [PATCH 1/4] chore: re-enable dependabot with 2-day cooldown (#118) Rename .disabled configs back and add cooldown: default-days: 2 Signed-off-by: Moe Zein --- .github/{dependabot.yml.disabled => dependabot.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{dependabot.yml.disabled => dependabot.yml} (100%) diff --git a/.github/dependabot.yml.disabled b/.github/dependabot.yml similarity index 100% rename from .github/dependabot.yml.disabled rename to .github/dependabot.yml From 3c9355f75e228aa743db45f1dfdc217344fe13f8 Mon Sep 17 00:00:00 2001 From: Attila Szegedi Date: Mon, 22 Jun 2026 16:59:17 +0200 Subject: [PATCH 2/4] process_discovery: expose threadlocal_attribute_keys (#135) Add the optional `threadlocal_attribute_keys: Option>` field to the NAPI `TracerMetadata` and forward it to libdatadog's `tracer_metadata::TracerMetadata`. When set, libdatadog's `to_otel_process_ctx` injects: threadlocal.schema_version = "tlsdesc_v1_dev" threadlocal.attribute_key_map = ["datadog.local_root_span_id", ...threadlocal_attribute_keys] into the OTel process context, giving an out-of-process reader the name table for the uint8 key indices that OTEP-4947 thread-context records carry on the wire. The implicit `datadog.local_root_span_id` key is prepended by libdatadog itself; callers only supply their *additional* keys (entry 0 in this list = wire key index 1). The field is gated behind libdatadog's `otel-thread-ctx` Cargo feature, which arrived after v29.0.0. Bump the `libdd-library-config` dependency to v35.0.0 (matches the version already pinned by the crashtracker crate in this workspace) and enable the feature. Existing 8-arg constructor calls keep working because the new field is optional. The test exercises both the absent and present forms. --- Cargo.lock | 10 +++++----- crates/process_discovery/Cargo.toml | 2 +- crates/process_discovery/src/lib.rs | 11 +++++++++++ test/process-discovery.js | 21 +++++++++++++++++++++ 4 files changed, 38 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index afac19e..a8d1c7e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -811,17 +811,17 @@ dependencies = [ [[package]] name = "libdd-library-config" -version = "1.0.0" -source = "git+https://github.com/DataDog/libdatadog.git?tag=v29.0.0#001bd56fcbba34fa4ec3f9798a6c4fbcddeffa40" +version = "2.0.0" +source = "git+https://github.com/DataDog/libdatadog.git?tag=v35.0.0#aa78483fba211c72ca3759c76318895f45e0184b" dependencies = [ "anyhow", + "libc", "libdd-trace-protobuf", "memfd", "prost", "rand", "rmp", "rmp-serde", - "rustix", "serde", "serde_yaml", ] @@ -883,8 +883,8 @@ dependencies = [ [[package]] name = "libdd-trace-protobuf" -version = "1.1.0" -source = "git+https://github.com/DataDog/libdatadog.git?tag=v29.0.0#001bd56fcbba34fa4ec3f9798a6c4fbcddeffa40" +version = "3.0.2" +source = "git+https://github.com/DataDog/libdatadog.git?tag=v35.0.0#aa78483fba211c72ca3759c76318895f45e0184b" dependencies = [ "prost", "serde", diff --git a/crates/process_discovery/Cargo.toml b/crates/process_discovery/Cargo.toml index 30f94b4..4aa80ce 100644 --- a/crates/process_discovery/Cargo.toml +++ b/crates/process_discovery/Cargo.toml @@ -8,7 +8,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] anyhow = "1" -libdd-library-config = { git = "https://github.com/DataDog/libdatadog.git", tag = "v29.0.0" } +libdd-library-config = { git = "https://github.com/DataDog/libdatadog.git", tag = "v35.0.0", features = ["otel-thread-ctx"] } napi = { version = "2" } napi-derive = { version = "2", default-features = false } diff --git a/crates/process_discovery/src/lib.rs b/crates/process_discovery/src/lib.rs index 3649959..3bf3516 100644 --- a/crates/process_discovery/src/lib.rs +++ b/crates/process_discovery/src/lib.rs @@ -21,6 +21,16 @@ pub struct TracerMetadata { pub service_version: Option, pub process_tags: Option, pub container_id: Option, + /// Ordered list of attribute key names for thread-level OTEP-4947 + /// context records. Key indices on the wire index into this list. + /// libdatadog's OTel process-context conversion prepends the + /// implicit `datadog.local_root_span_id` entry at wire index 0, so + /// callers should only set their additional keys here — entry 0 in + /// this list corresponds to wire key index 1. + /// + /// `null`/omitted (the default) disables the thread-context-related + /// attributes in the OTel process context entirely. + pub threadlocal_attribute_keys: Option>, } #[napi] @@ -36,6 +46,7 @@ pub fn store_metadata(data: &TracerMetadata) -> napi::Result { for (const fd in fds) { From ebcb39f777a6107f3b1a653d0d101931aa24f292 Mon Sep 17 00:00:00 2001 From: Attila Szegedi Date: Mon, 22 Jun 2026 17:52:10 +0200 Subject: [PATCH 3/4] fix: release tag push (#137) The release workflow's tag push was rejected by the tag ruleset because actions/checkout persisted GITHUB_TOKEN credentials, which took precedence over the dd-octo-sts token in the explicit push URL. Drop the persisted credentials and downgrade contents permission to read. Also add the dd-octo-sts policy file. --- .../self.github.release.push-tags.sts.yaml | 12 ++++++++++++ .github/workflows/release.yml | 11 +++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 .github/chainguard/self.github.release.push-tags.sts.yaml diff --git a/.github/chainguard/self.github.release.push-tags.sts.yaml b/.github/chainguard/self.github.release.push-tags.sts.yaml new file mode 100644 index 0000000..e807440 --- /dev/null +++ b/.github/chainguard/self.github.release.push-tags.sts.yaml @@ -0,0 +1,12 @@ +issuer: https://token.actions.githubusercontent.com + +subject: repo:DataDog/libdatadog-nodejs:environment:npm + +claim_pattern: + event_name: push + job_workflow_ref: DataDog/libdatadog-nodejs/\.github/workflows/release\.yml@refs/heads/v[0-9]+\.x + ref: refs/heads/v[0-9]+\.x + repository: DataDog/libdatadog-nodejs + +permissions: + contents: write diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c6abf54..8cfd339 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,11 +36,18 @@ jobs: environment: npm permissions: id-token: write # Required for OIDC - contents: write + contents: read outputs: pkgjson: ${{ steps.pkg.outputs.json }} steps: + - uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3 + id: octo-sts + with: + scope: DataDog/libdatadog-nodejs + policy: self.github.release.push-tags - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false # drop GITHUB_TOKEN so the dd-octo-sts token is used for the tag push - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: prebuilds @@ -57,4 +64,4 @@ jobs: echo "json=$content" >> $GITHUB_OUTPUT - run: | git tag v${{ fromJson(steps.pkg.outputs.json).version }} - git push origin v${{ fromJson(steps.pkg.outputs.json).version }} + git push https://x-access-token:${{ steps.octo-sts.outputs.token }}@github.com/${{ github.repository }}.git v${{ fromJson(steps.pkg.outputs.json).version }} From 04f87b10258138ceb2b3a38eccd30e737c07c3bd Mon Sep 17 00:00:00 2001 From: Attila Szegedi Date: Mon, 22 Jun 2026 17:55:08 +0200 Subject: [PATCH 4/4] v0.10.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b8841cf..a974a2d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@datadog/libdatadog", - "version": "0.9.4", + "version": "0.10.0", "description": "Node.js binding for libdatadog", "main": "index.js", "scripts": {