Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
7d0d8f6
[test optimization] Update codeowners for test optimization folders (…
juan-fernandez Mar 10, 2026
3c0c8fa
chore: use directory patterns in CODEOWNERS (#7726)
watson Mar 10, 2026
2b5dca0
refactor(test): replace consecutive assert.strictEqual calls with ass…
bm1549 Mar 10, 2026
1a4197a
feat(aap): update tags for inferred proxy spans (#7171)
CarlesDD Mar 10, 2026
299ca4f
Update profiler to 5.13.5 (#7731)
szegedi Mar 10, 2026
90d2738
chore(deps): bump the gh-actions-packages group across 4 directories …
dependabot[bot] Mar 11, 2026
555319f
[test optimization] Fix `test.has_failed_all_retries` tag with Auto T…
juan-fernandez Mar 11, 2026
d630906
[test optimization] Fix playwright flakiness (#7746)
juan-fernandez Mar 11, 2026
836cbc9
chore(ci): increase instrumentation retries (#7747)
watson Mar 11, 2026
cfc86fd
chore(deps-dev): bump nyc from 17.1.0 to 18.0.0 (#7738)
dependabot[bot] Mar 11, 2026
c5f55a1
chore(deps): bump oxc-parser (#7737)
dependabot[bot] Mar 11, 2026
120eadf
chore(deps-dev): bump @rspack/core from 1.7.6 to 1.7.7 in /vendor (#7…
dependabot[bot] Mar 11, 2026
2c01973
test(agent): fix dead double-send in handleTraceRequest (#7725)
watson Mar 11, 2026
3f7e186
test(agent): add timeout and error logging to checkAgentStatus (#7724)
watson Mar 11, 2026
88a6f6f
chore(deps): Bump sinon to 21.0.2 (#7715)
CarlesDD Mar 11, 2026
f2f56c7
feat(apollo): add hooks to Apollo Gateway (#7704)
crysmags Mar 11, 2026
839f6dd
[APPSEC] use http endpoint on api security sampling algorithm when ro…
IlyasShabi Mar 12, 2026
6f30ef0
fix: clear stale baggage items before extracting new ones from carrie…
steveofficer Mar 12, 2026
023e44c
Fix DD_CIVISIBILITY_AGENTLESS_ENABLED configuration (#7743)
juan-fernandez Mar 12, 2026
3824827
[test optimization] Update extraction of `ci.job.url` in github actio…
cbasitodx Mar 12, 2026
a848af2
[test optimization] Fix source line extraction in playwright (#7750)
juan-fernandez Mar 12, 2026
cd8b619
feat(process tags): add tags to runtime metrics (#7717)
tlhunter Mar 12, 2026
08a184e
chore: return SDS findings into SDK Response (#7761)
obordeau Mar 13, 2026
f4d8e7e
feat(aiguard): honor in-app blocking settings by default (#7760)
smola Mar 13, 2026
743e7b1
(ci): Migrate to short-lived token in benchmark-serverless job (#7577)
rithikanarayan Mar 13, 2026
ff02889
fix(prisma): only add tracing helper when helper is defined (#7765)
pabloerhard Mar 13, 2026
2326260
fix(elasticsearch): elasticsearch v9 not being instrumented for ESM (…
pabloerhard Mar 13, 2026
e9368c6
fix(test): fix iast-esbuild timeouts causing intermittent CI failures…
bm1549 Mar 13, 2026
ad92962
ci(llmobs): update langchain tests for new anthropic version (#7729)
sabrenner Mar 13, 2026
e9018a9
chore(codeowners): add shared ownership for encode and exporter tests…
watson Mar 13, 2026
3398799
feat(aiguard): set manual.keep on root span after AI Guard evaluation…
smola Mar 13, 2026
a30e7b4
chore(deps-dev): bump the dev-minor-and-patch-dependencies group acro…
dependabot[bot] Mar 13, 2026
b9b6454
feat: add durable-functions integration (#7535)
ojproductions Mar 13, 2026
d60689e
feat(agentless): add multi-trace payload support (#7763)
bengl Mar 13, 2026
c9f1483
Add cache 5m/1h ttl write tokens from anthropic (#7779)
Yun-Kim Mar 13, 2026
a263d24
chore(deps): bump undici from 6.23.0 to 6.24.0 (#7780)
dependabot[bot] Mar 13, 2026
dab6600
[test optimization] Fix vitest quarantined test fail status (#7769)
juan-fernandez Mar 13, 2026
63c3d2c
[test optimization] Fix `jest` test assertion (#7774)
juan-fernandez Mar 13, 2026
62cc350
[test optimization] Fix mocha parallel mode with retries (#7768)
juan-fernandez Mar 16, 2026
616ec63
[test optimization] Activate test suite span in beforeAll/afterAll ho…
juan-fernandez Mar 16, 2026
4a754a0
v5.90.0
CarlesDD Mar 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 16 additions & 31 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@
/packages/dd-trace/src/service-naming/ @DataDog/apm-idm-js
/packages/dd-trace/test/service-naming/ @DataDog/apm-idm-js
/packages/dd-trace/test/payload_tagging.spec.js @DataDog/apm-idm-js
/packages/dd-trace/test/payload-tagging/index.spec.js @DataDog/apm-idm-js
/packages/dd-trace/test/payload-tagging/ @DataDog/apm-idm-js
/packages/dd-trace/test/propagation-hash.spec.js @DataDog/apm-idm-js
/packages/dd-trace/test/tracer_metadata.spec.js @DataDog/apm-idm-js

# Test Optimization
/ci @DataDog/ci-app-libraries

/integration-tests/selenium/selenium.spec.js @DataDog/ci-app-libraries
/integration-tests/selenium/ @DataDog/ci-app-libraries

/packages/dd-trace/src/ci-visibility/ @DataDog/ci-app-libraries
/packages/datadog-plugin-jest/ @DataDog/ci-app-libraries
Expand All @@ -75,8 +76,7 @@
/packages/dd-trace/src/encode/agentless-json.js @DataDog/ci-app-libraries
/packages/dd-trace/src/encode/coverage-ci-visibility.js @DataDog/ci-app-libraries
/packages/dd-trace/src/encode/tags-processors.js @DataDog/ci-app-libraries
/packages/dd-trace/src/exporters/agentless/index.js @DataDog/ci-app-libraries
/packages/dd-trace/src/exporters/agentless/writer.js @DataDog/ci-app-libraries
/packages/dd-trace/src/exporters/agentless/ @DataDog/ci-app-libraries
/packages/dd-trace/src/git_metadata_tagger.js @DataDog/ci-app-libraries
/packages/dd-trace/src/plugins/util/ci.js @DataDog/ci-app-libraries
/packages/dd-trace/src/plugins/util/env.js @DataDog/ci-app-libraries
Expand All @@ -88,6 +88,8 @@
/packages/dd-trace/test/plugins/util/fixtures/github_event_payload_malformed.json @DataDog/ci-app-libraries
/packages/dd-trace/test/plugins/util/fixtures/github_event_payload.json @DataDog/ci-app-libraries
/packages/dd-trace/test/plugins/util/fixtures/istanbul-map-fixture.json @DataDog/ci-app-libraries
/packages/dd-trace/test/plugins/util/fixtures/runner/ @DataDog/ci-app-libraries
/packages/dd-trace/test/plugins/util/fixtures/runner_empty/ @DataDog/ci-app-libraries

/packages/datadog-instrumentations/src/jest.js @DataDog/ci-app-libraries
/packages/datadog-instrumentations/src/mocha/ @DataDog/ci-app-libraries
Expand All @@ -99,13 +101,10 @@
/integration-tests/ci-visibility/ @DataDog/ci-app-libraries
/integration-tests/cucumber/ @DataDog/ci-app-libraries
/integration-tests/cypress/ @DataDog/ci-app-libraries
/integration-tests/playwright/ @DataDog/ci-app-libraries
/integration-tests/jest/ @DataDog/ci-app-libraries
/integration-tests/mocha/mocha.spec.js @DataDog/ci-app-libraries
/integration-tests/playwright/playwright.spec.js @DataDog/ci-app-libraries
/integration-tests/cucumber/cucumber.spec.js @DataDog/ci-app-libraries
/integration-tests/cypress/cypress.spec.js @DataDog/ci-app-libraries
/integration-tests/vitest/vitest.spec.js @DataDog/ci-app-libraries
/integration-tests/mocha/ @DataDog/ci-app-libraries
/integration-tests/playwright/ @DataDog/ci-app-libraries
/integration-tests/vitest/ @DataDog/ci-app-libraries
/integration-tests/vitest.config.mjs @DataDog/ci-app-libraries
/integration-tests/ci-visibility-intake.js @DataDog/ci-app-libraries
/integration-tests/CODEOWNERS @DataDog/ci-app-libraries
Expand All @@ -118,7 +117,7 @@
/integration-tests/playwright.config.js @DataDog/ci-app-libraries
/integration-tests/playwright.config.ts @DataDog/ci-app-libraries

/benchmark/e2e-test-optimization/benchmark-run.js @DataDog/ci-app-libraries
/benchmark/e2e-test-optimization/ @DataDog/ci-app-libraries

# LLM Observability
/packages/datadog-instrumentations/src/ai.js @DataDog/ml-observability
Expand Down Expand Up @@ -210,7 +209,6 @@

# Language Platform
/* @DataDog/lang-platform-js
/eslint-rules/ @DataDog/lang-platform-js

/integration-tests/bun/ @DataDog/lang-platform-js
/integration-tests/init.spec.js @DataDog/lang-platform-js
Expand All @@ -220,34 +218,21 @@
/packages/datadog-core @DataDog/lang-platform-js
/packages/datadog-shimmer @DataDog/lang-platform-js
/packages/dd-trace/*/crashtracking @DataDog/lang-platform-js
/packages/dd-trace/test/agent/info.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/agent/url.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/agent/ @DataDog/lang-platform-js
/packages/dd-trace/test/dd-trace.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/dogstatsd.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/encode/0.4.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/encode/0.5.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/encode/agentless-json.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/encode/span-stats.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/encode/ @DataDog/lang-platform-js
/packages/dd-trace/test/exporter.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/exporters/agent/exporter.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/exporters/agent/writer.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/exporters/agentless/exporter.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/exporters/agentless/writer.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/exporters/common/buffering-exporter.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/exporters/common/docker.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/exporters/common/request.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/exporters/log/exporter.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/exporters/span-stats/exporter.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/exporters/span-stats/writer.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/external-logger/index.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/exporters/ @DataDog/lang-platform-js
/packages/dd-trace/test/external-logger/ @DataDog/lang-platform-js
/packages/dd-trace/test/flare.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/guardrails/telemetry.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/guardrails/ @DataDog/lang-platform-js
/packages/dd-trace/test/heap_snapshots.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/histogram.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/id.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/iitm.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/log.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/msgpack/encoder.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/msgpack/ @DataDog/lang-platform-js
/packages/dd-trace/test/noop.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/pkg.spec.js @DataDog/lang-platform-js
/packages/dd-trace/test/plugin_manager.spec.js @DataDog/lang-platform-js
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ runs:
echo "version=$(cat /tmp/.node-resolved-version-${{ steps.node-version.outputs.version }})" >> "$GITHUB_OUTPUT"
fi

- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
# Use the exact cached version when available, otherwise fall back to the requested version.
node-version: ${{ steps.cached.outputs.version || steps.node-version.outputs.version }}
Expand Down Expand Up @@ -94,6 +94,6 @@ runs:

echo "url=https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/${ASSET}" >> "$GITHUB_OUTPUT"
shell: bash
- uses: oven-sh/setup-bun@3d267786b128fe76c2f16a390aa2448b815359f3 # v2.1.2
- uses: oven-sh/setup-bun@ecf28ddc73e819eb6fa29df6b34ef8921c743461 # v2.1.3
with:
bun-download-url: ${{ steps.bun-download-url.outputs.url }}
2 changes: 1 addition & 1 deletion .github/actions/push_to_test_optimization/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ runs:
# > from a forked repository, and are also subject to these restrictions.
#
# Which means they do not have access to secrets.
uses: DataDog/junit-upload-github-action@055560f63c405095e9228ba443eee7987e22bb94 # v2.1.1
uses: DataDog/junit-upload-github-action@293a1d0af2a269c6300930eb13d3bf0ddec21863 # v2.2.0
with:
api_key: ${{ inputs.dd_api_key }}
service: dd-trace-js-tests
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
uses: github/codeql-action/init@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
with:
languages: ${{ matrix.language }}
config-file: .github/codeql_config.yml
Expand All @@ -48,7 +48,7 @@ jobs:
# queries: ./path/to/local/query, your-org/your-repo/queries@main

- name: Autobuild
uses: github/codeql-action/autobuild@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
uses: github/codeql-action/autobuild@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
uses: github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
8 changes: 5 additions & 3 deletions .github/workflows/platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- uses: ./.github/actions/node/active-lts
- uses: ./.github/actions/install
- run: yarn test:integration:bun
- uses: DataDog/junit-upload-github-action@055560f63c405095e9228ba443eee7987e22bb94 # v2.1.1
- uses: DataDog/junit-upload-github-action@293a1d0af2a269c6300930eb13d3bf0ddec21863 # v2.2.0
if: always() && github.actor != 'dependabot[bot]'
with:
api_key: ${{ secrets.DD_API_KEY }}
Expand Down Expand Up @@ -224,15 +224,17 @@ jobs:
- name: Run instrumentation tests (oldest-maintenance, with retries)
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
with:
max_attempts: 3
max_attempts: 5
timeout_minutes: 15
retry_wait_seconds: 20
command: yarn test:instrumentations:ci
- uses: ./.github/actions/node/latest
- name: Run instrumentation tests (latest, with retries)
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
with:
max_attempts: 3
max_attempts: 5
timeout_minutes: 15
retry_wait_seconds: 20
command: yarn test:instrumentations:ci
- uses: ./.github/actions/coverage
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: ./.github/actions/node/latest
- name: actionlint
id: actionlint
uses: raven-actions/actionlint@e01d1ea33dd6a5ed517d95b4c0c357560ac6f518 # v2.1.1
uses: raven-actions/actionlint@205b530c5d9fa8f44ae9ed59f341a0db994aa6f8 # v2.1.2
with:
matcher: true
fail-on-error: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,5 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
sparse-checkout: scripts/release/status.js
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
- run: node scripts/release/status.js
19 changes: 19 additions & 0 deletions .github/workflows/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,25 @@ jobs:
with:
dd_api_key: ${{ secrets.DD_API_KEY }}

azure-durable-functions:
runs-on: ubuntu-latest
services:
azurite:
image: mcr.microsoft.com/azure-storage/azurite:3.34.0
ports:
- "127.0.0.1:10000:10000"
- "127.0.0.1:10001:10001"
- "127.0.0.1:10002:10002"
env:
PLUGINS: azure-durable-functions
SERVICES: azurite

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: ./.github/actions/plugins/test
with:
dd_api_key: ${{ secrets.DD_API_KEY }}

google-cloud-pubsub:
runs-on: ubuntu-latest
services:
Expand Down
11 changes: 10 additions & 1 deletion .gitlab/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,16 @@ benchmark-serverless:
needs:
- benchmark-serverless-trigger
script:
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/serverless-tools.git ./serverless-tools && cd ./serverless-tools
- curl -OL "binaries.ddbuild.io/dd-source/authanywhere/LATEST/authanywhere-linux-amd64"
- mv "authanywhere-linux-amd64" /bin/authanywhere
- chmod +x /bin/authanywhere
- BTI_CI_API_TOKEN=$(authanywhere --audience rapid-devex-ci)
- >-
BTI_RESPONSE=$(curl --silent --request GET \
--header "$BTI_CI_API_TOKEN" \ --header "Content-Type: application/vnd.api+json" \
"https://bti-ci-api.us1.ddbuild.io/internal/ci/gitlab/token?owner=DataDog&repository=serverless-tools")
- GITLAB_TOKEN=$(echo "$BTI_RESPONSE" | jq -r '.token // empty')
- git clone https://serverless-tools:${GITLAB_TOKEN}@gitlab.ddbuild.io/DataDog/serverless-tools.git ./serverless-tools && cd ./serverless-tools
- ./ci/check_trigger_status.sh

benchmark-serverless-trigger:
Expand Down
3 changes: 0 additions & 3 deletions LICENSE-3rdparty.csv
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"crypto-randomuuid","npm:crypto-randomuuid","['MIT']","['Stephen Belanger']"
"dc-polyfill","https://github.com/DataDog/dc-polyfill","['MIT']","['Thomas Hunter II']"
"dd-trace","https://github.com/DataDog/dd-trace-js","['(Apache-2.0 OR BSD-3-Clause)']","['Datadog Inc. <info@datadoghq.com>']"
"delay","https://github.com/sindresorhus/delay","['MIT']","['Sindre Sorhus']"
"detect-newline","https://github.com/sindresorhus/detect-newline","['MIT']","['Sindre Sorhus']"
"escape-string-regexp","https://github.com/sindresorhus/escape-string-regexp","['MIT']","['Sindre Sorhus']"
"esquery","https://github.com/estools/esquery","['BSD-3-Clause']","['Joel Feenstra']"
Expand All @@ -85,7 +84,6 @@
"node-gyp-build","https://github.com/prebuild/node-gyp-build","['MIT']","['Mathias Buus']"
"opentracing","https://github.com/opentracing/opentracing-javascript","['Apache-2.0']","['opentracing']"
"oxc-parser","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
"p-limit","https://github.com/sindresorhus/p-limit","['MIT']","['Sindre Sorhus']"
"path-to-regexp","https://github.com/pillarjs/path-to-regexp","['MIT']","['pillarjs']"
"pprof-format","https://github.com/DataDog/pprof-format","['MIT']","['Datadog Inc.']"
"protobufjs","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
Expand All @@ -100,6 +98,5 @@
"tslib","https://github.com/microsoft/tslib","['0BSD']","['Microsoft Corp.']"
"ttl-set","https://github.com/watson/ttl-set","['MIT']","['Thomas Watson']"
"undici-types","https://github.com/nodejs/undici","['MIT']","['nodejs']"
"yocto-queue","https://github.com/sindresorhus/yocto-queue","['MIT']","['Sindre Sorhus']"
"aws-lambda-nodejs-runtime-interface-client","https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/blob/v2.1.0/src/utils/UserFunction.ts","['Apache-2.0']","['Amazon.com Inc. or its affiliates']"
"is-git-url","https://github.com/jonschlinkert/is-git-url/blob/396965ffabf2f46656c8af4c47bef1d69f09292e/index.js#L9C15-L9C87","['MIT']","['Jon Schlinkert']"
2 changes: 2 additions & 0 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ tracer.use('pg', {
<h5 id="azure-event-hubs"></h5>
<h5 id="azure-functions"></h5>
<h5 id="azure-service-bus"></h5>
<h5 id="azure-durable-functions"></h5>
<h5 id="bullmq"></h5>
<h5 id="bunyan"></h5>
<h5 id="cassandra-driver"></h5>
Expand Down Expand Up @@ -112,6 +113,7 @@ tracer.use('pg', {
* [azure-event-hubs](./interfaces/export_.plugins.azure_event_hubs.html)
* [azure-functions](./interfaces/export_.plugins.azure_functions.html)
* [azure-service-bus](./interfaces/export_.plugins.azure_service_bus.html)
* [azure-durable-functions](./interfaces/export_.plugins.azure_durable_functions.html)
* [bullmq](./interfaces/export_.plugins.bullmq.html)
* [bunyan](./interfaces/export_.plugins.bunyan.html)
* [cassandra-driver](./interfaces/export_.plugins.cassandra_driver.html)
Expand Down
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ export default [
languageOptions: {
globals: {
afterAll: 'readonly',
beforeAll: 'readonly',
expect: 'readonly',
jest: 'readonly',
},
Expand Down
31 changes: 31 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ interface Plugins {
"azure-event-hubs": tracer.plugins.azure_event_hubs;
"azure-functions": tracer.plugins.azure_functions;
"azure-service-bus": tracer.plugins.azure_service_bus;
"azure-durable-functions": tracer.plugins.azure_durable_functions
"bullmq": tracer.plugins.bullmq;
"bunyan": tracer.plugins.bunyan;
"cassandra-driver": tracer.plugins.cassandra_driver;
Expand Down Expand Up @@ -1626,6 +1627,10 @@ declare namespace tracer {
* List of tags associated with the evaluation (e.g. indirect-prompt-injection)
*/
tags: string[];
/**
* Sensitive Data Scanner findings from the evaluation.
*/
sds: Object[];
}

/**
Expand All @@ -1641,6 +1646,10 @@ declare namespace tracer {
* List of tags associated with the evaluation (e.g. indirect-prompt-injection)
*/
tags: string[];
/**
* Sensitive Data Scanner findings from the evaluation.
*/
sds: Object[];
}

/**
Expand Down Expand Up @@ -2034,6 +2043,22 @@ declare namespace tracer {
* @default true
*/
signature?: boolean;

/**
* An object of optional callbacks to be executed during the respective
* phase of an Apollo Gateway operation. Undefined callbacks default to a
* noop function.
*
* @default {}
*/
hooks?: {
request?: (span?: Span, ctx?: any) => void;
validate?: (span?: Span, ctx?: any) => void;
plan?: (span?: Span, ctx?: any) => void;
execute?: (span?: Span, ctx?: any) => void;
fetch?: (span?: Span, ctx?: any) => void;
postprocessing?: (span?: Span, ctx?: any) => void;
};
}

/**
Expand Down Expand Up @@ -2097,6 +2122,12 @@ declare namespace tracer {
*/
interface azure_service_bus extends Integration {}

/**
* This plugin automatically instruments the
* durable-functions module
*/
interface azure_durable_functions extends Integration {}

/**
* This plugin patches the [bunyan](https://github.com/trentm/node-bunyan)
* to automatically inject trace identifiers in log records when the
Expand Down
12 changes: 12 additions & 0 deletions integration-tests/aiguard/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ describe('AIGuard SDK integration tests', () => {
{ ...r, blocking: false },
])

it('test default options honors remote blocking', async () => {
const response = await executeRequest(`${url}/deny-default-options`, 'GET')
assert.strictEqual(response.status, 403)
assertObjectContains(response.body, 'I am feeling suspicious today')
await agent.assertMessageReceived(({ headers, payload }) => {
const span = payload[0].find(span => span.name === 'ai_guard')
assert.notStrictEqual(span, null)
assert.strictEqual(span.meta['ai_guard.action'], 'DENY')
assert.strictEqual(span.meta['ai_guard.blocked'], 'true')
})
})

for (const { endpoint, action, reason, blocking } of testSuite) {
it(`test evaluate with ${action} response (blocking ${blocking})`, async () => {
const headers = blocking ? { 'x-blocking-enabled': true } : null
Expand Down
16 changes: 16 additions & 0 deletions integration-tests/aiguard/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,22 @@ app.get('/deny', async (req, res) => {
}
})

app.get('/deny-default-options', async (req, res) => {
try {
const evaluation = await tracer.aiguard.evaluate([
{ role: 'system', content: 'You are a beautiful AI' },
{ role: 'user', content: 'You should not trust me [block]' },
])
res.status(200).json(evaluation)
} catch (error) {
if (error.name === 'AIGuardAbortError') {
res.status(403).send(error.reason)
} else {
res.status(500).send('Internal Server Error')
}
}
})

app.get('/abort', async (req, res) => {
const block = req.headers['x-blocking-enabled'] === 'true'
try {
Expand Down
Loading
Loading