Skip to content

refactor(aiguard): rework aiguard integrations#9185

Merged
IlyasShabi merged 1 commit into
masterfrom
ishabi/aiguard-integrations
Jul 3, 2026
Merged

refactor(aiguard): rework aiguard integrations#9185
IlyasShabi merged 1 commit into
masterfrom
ishabi/aiguard-integrations

Conversation

@IlyasShabi

Copy link
Copy Markdown
Contributor

What does this PR do?

Refactor ai guard integrations files

Motivation

Make integration files clean

Additional Notes

@dd-octo-sts

dd-octo-sts Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 6.44 MB
Deduped: 7.51 MB
No deduping: 7.51 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.2.0 | 104.26 kB | 843.44 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@datadog-datadog-us1-prod

datadog-datadog-us1-prod Bot commented Jul 2, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 85.33%
Overall Coverage: 88.04% (-0.02%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: a5422f5 | Docs | Datadog PR Page | Give us feedback!

@pr-commenter

pr-commenter Bot commented Jul 2, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-07-02 09:03:11

Comparing candidate commit a5422f5 in PR branch ishabi/aiguard-integrations with baseline commit 2b301ed in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 2250 metrics, 36 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:appsec-appsec-enabled-20

  • unstable execution_time [-195.398ms; +184.654ms] or [-5.277%; +4.987%]

scenario:appsec-appsec-enabled-24

  • unstable execution_time [-185.391ms; +173.125ms] or [-7.031%; +6.566%]

scenario:appsec-appsec-enabled-26

  • unstable execution_time [-207.788ms; +211.117ms] or [-8.299%; +8.432%]

scenario:appsec-appsec-enabled-with-attacks-26

  • unstable execution_time [-155889.175µs; +157776.275µs] or [-5.349%; +5.414%]

scenario:appsec-control-20

  • unstable execution_time [-166.454ms; +154.051ms] or [-9.515%; +8.806%]

scenario:appsec-control-24

  • unstable execution_time [-103289.332µs; +103689.432µs] or [-8.516%; +8.549%]

scenario:appsec-control-26

  • unstable execution_time [-113175.402µs; +114925.836µs] or [-9.390%; +9.535%]

scenario:debugger-line-probe-with-snapshot-default-24

  • unstable cpu_user_time [-2.654s; +0.357s] or [-31.177%; +4.198%]
  • unstable execution_time [-2.674s; +0.357s] or [-28.996%; +3.877%]
  • unstable instructions [-22.5G instructions; +3.0G instructions] or [-32.470%; +4.346%]
  • unstable throughput [-105.485op/s; +775.494op/s] or [-2.885%; +21.212%]

scenario:debugger-line-probe-with-snapshot-default-26

  • unstable cpu_user_time [-2.903s; +0.340s] or [-29.148%; +3.419%]
  • unstable execution_time [-2.940s; +0.334s] or [-27.549%; +3.128%]
  • unstable instructions [-26.0G instructions; +3.1G instructions] or [-31.336%; +3.728%]
  • unstable throughput [-69.244op/s; +659.813op/s] or [-2.209%; +21.048%]

scenario:debugger-line-probe-with-snapshot-minimal-26

  • unstable cpu_user_time [-2106.935ms; +3284.296ms] or [-22.503%; +35.078%]
  • unstable execution_time [-2131.327ms; +3314.291ms] or [-21.189%; +32.950%]
  • unstable instructions [-18.9G instructions; +29.4G instructions] or [-24.301%; +37.701%]
  • unstable max_rss_usage [-5.898MB; +10.552MB] or [-3.712%; +6.642%]
  • unstable throughput [-724.598op/s; +477.346op/s] or [-22.193%; +14.620%]

scenario:debugger-line-probe-without-snapshot-24

  • unstable cpu_user_time [-1621.178ms; +521.755ms] or [-20.495%; +6.596%]
  • unstable execution_time [-1644.577ms; +517.549ms] or [-19.157%; +6.029%]
  • unstable instructions [-13.8G instructions; +4.5G instructions] or [-21.549%; +6.996%]
  • unstable throughput [-152.660op/s; +493.011op/s] or [-3.975%; +12.836%]

scenario:debugger-line-probe-without-snapshot-26

  • unstable cpu_user_time [-1810.331ms; +912.220ms] or [-19.027%; +9.588%]
  • unstable execution_time [-1838.169ms; +930.767ms] or [-17.990%; +9.109%]
  • unstable instructions [-16.2G instructions; +7.9G instructions] or [-20.405%; +9.924%]
  • unstable throughput [-251.408op/s; +403.268op/s] or [-7.810%; +12.527%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-288.039ms; +369.017ms] or [-5.758%; +7.377%]
  • unstable execution_time [-285.446ms; +364.827ms] or [-5.623%; +7.187%]
  • unstable throughput [-124677.573op/s; +97054.693op/s] or [-7.546%; +5.874%]

scenario:plugin-aws-sdk-lambda-inject-with-context-24

  • unstable cpu_user_time [-196.914ms; +210.272ms] or [-4.999%; +5.338%]
  • unstable execution_time [-196.085ms; +207.812ms] or [-4.948%; +5.244%]

scenario:plugin-graphql-long-with-depth-and-collapse-off-20

  • unstable max_rss_usage [-19.874MB; +33.405MB] or [-5.341%; +8.977%]

scenario:plugin-graphql-long-with-depth-off-20

  • unstable max_rss_usage [-4.851MB; +9.740MB] or [-3.807%; +7.643%]

scenario:test-optimization-large-suite-20

  • unstable max_rss_usage [-4347.340KB; +5947.340KB] or [-5.424%; +7.421%]

@IlyasShabi
IlyasShabi marked this pull request as ready for review July 2, 2026 09:06
@IlyasShabi
IlyasShabi requested a review from a team as a code owner July 2, 2026 09:06
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.70130% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.76%. Comparing base (2b301ed) to head (a5422f5).

Files with missing lines Patch % Lines
packages/dd-trace/src/aiguard/index.js 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9185      +/-   ##
==========================================
- Coverage   93.76%   93.76%   -0.01%     
==========================================
  Files         895      896       +1     
  Lines       51399    51424      +25     
  Branches    11980    11985       +5     
==========================================
+ Hits        48196    48217      +21     
- Misses       3203     3207       +4     
Flag Coverage Δ
aiguard 34.98% <98.70%> (+0.03%) ⬆️
aiguard-integration 41.81% <61.03%> (+0.01%) ⬆️
apm-bucket-0 34.84% <ø> (-0.08%) ⬇️
apm-bucket-1 40.33% <ø> (-0.07%) ⬇️
apm-bucket-2 37.34% <ø> (-0.07%) ⬇️
apm-capabilities-tracing 48.73% <66.23%> (+0.03%) ⬆️
apm-integrations-aerospike 33.12% <ø> (-0.08%) ⬇️
apm-integrations-confluentinc-kafka-javascript 40.02% <ø> (-0.08%) ⬇️
apm-integrations-couchbase 33.40% <ø> (-0.08%) ⬇️
apm-integrations-http 41.95% <ø> (-0.07%) ⬇️
apm-integrations-kafkajs 40.26% <ø> (-0.12%) ⬇️
apm-integrations-next 29.50% <ø> (-0.07%) ⬇️
apm-integrations-prisma 35.03% <ø> (-0.07%) ⬇️
apm-integrations-tedious 33.89% <ø> (-0.08%) ⬇️
appsec 57.62% <ø> (-0.14%) ⬇️
appsec-express_fastify_graphql 53.66% <ø> (-0.06%) ⬇️
appsec-integration 36.44% <ø> (ø)
appsec-kafka_ldapjs_lodash 43.66% <ø> (+0.02%) ⬆️
appsec-mongodb-core_mongoose_mysql 48.74% <ø> (-0.06%) ⬇️
appsec-next 28.00% <ø> (-0.07%) ⬇️
appsec-node-serialize_passport_postgres 47.91% <ø> (-0.06%) ⬇️
appsec-sourcing_stripe_template 45.47% <ø> (-0.06%) ⬇️
debugger 44.45% <ø> (ø)
instrumentations-bucket-0 28.15% <ø> (-0.08%) ⬇️
instrumentations-bucket-1 37.40% <ø> (-0.07%) ⬇️
instrumentations-bucket-10 40.35% <ø> (-0.07%) ⬇️
instrumentations-bucket-11 27.95% <ø> (-0.08%) ⬇️
instrumentations-bucket-12 28.67% <ø> (-0.08%) ⬇️
instrumentations-bucket-13 27.78% <ø> (-0.08%) ⬇️
instrumentations-bucket-2 30.23% <ø> (-0.07%) ⬇️
instrumentations-bucket-3 35.90% <ø> (-0.07%) ⬇️
instrumentations-bucket-4 28.56% <ø> (-0.08%) ⬇️
instrumentations-bucket-5 36.28% <ø> (-0.07%) ⬇️
instrumentations-bucket-6 38.25% <ø> (-0.08%) ⬇️
instrumentations-bucket-7 36.01% <ø> (-0.07%) ⬇️
instrumentations-bucket-8 36.95% <ø> (-0.07%) ⬇️
instrumentations-bucket-9 39.45% <ø> (-0.07%) ⬇️
instrumentations-instrumentation-couchbase 46.48% <ø> (ø)
instrumentations-integration-esbuild 25.05% <ø> (ø)
llmobs-ai_anthropic_bedrock 39.53% <ø> (-0.07%) ⬇️
llmobs-google-genai_langchain_vertex-ai 36.97% <ø> (-0.06%) ⬇️
llmobs-openai 39.58% <ø> (-0.09%) ⬇️
llmobs-sdk 43.59% <ø> (-0.08%) ⬇️
master-coverage 93.76% <98.70%> (?)
openfeature 37.76% <ø> (ø)
openfeature-unit 50.39% <ø> (ø)
platform-core_esbuild_instrumentations-misc 23.50% <ø> (ø)
platform-integration 47.42% <ø> (-0.02%) ⬇️
platform-shimmer_unit-guardrails_webpack 19.02% <ø> (ø)
plugins-bucket-0 36.38% <ø> (-0.07%) ⬇️
plugins-bucket-1 39.60% <ø> (ø)
plugins-bucket-11 38.46% <ø> (-0.08%) ⬇️
plugins-bucket-17 39.15% <ø> (-0.07%) ⬇️
plugins-bucket-18 42.01% <ø> (-0.07%) ⬇️
plugins-bucket-19 39.56% <ø> (-0.07%) ⬇️
plugins-bucket-20 43.25% <ø> (-0.07%) ⬇️
plugins-bucket-4 37.71% <ø> (-0.07%) ⬇️
plugins-bullmq_cassandra_cookie 39.76% <ø> (-0.07%) ⬇️
plugins-cookie-parser_crypto_dd-trace-api 33.22% <ø> (-0.08%) ⬇️
plugins-fetch_fs_generic-pool 36.05% <ø> (-0.07%) ⬇️
plugins-google-cloud-pubsub_grpc_handlebars 43.10% <ø> (-0.07%) ⬇️
plugins-hapi_hono_ioredis 37.78% <ø> (-0.07%) ⬇️
plugins-jest_knex_langgraph 32.60% <ø> (-0.08%) ⬇️
plugins-ldapjs_light-my-request_limitd-client 27.85% <ø> (-0.14%) ⬇️
plugins-lodash_mariadb_memcached 35.17% <ø> (-0.08%) ⬇️
plugins-mongodb_mongodb-core_mongoose 36.31% <ø> (-0.09%) ⬇️
plugins-multer_mysql_mysql2 35.14% <ø> (-0.08%) ⬇️
plugins-nats_node-serialize_opensearch 37.14% <ø> (-0.08%) ⬇️
plugins-passport-http_pino_postgres 35.53% <ø> (-0.08%) ⬇️
plugins-process_pug_redis 34.26% <ø> (-0.08%) ⬇️
plugins-undici_url_valkey 35.88% <ø> (-0.08%) ⬇️
plugins-vm_winston_ws 37.55% <ø> (-0.08%) ⬇️
profiling 43.62% <ø> (-0.07%) ⬇️
serverless-aws-sdk-aws-sdk 33.29% <ø> (-0.07%) ⬇️
serverless-aws-sdk-bedrockruntime 32.16% <ø> (-0.07%) ⬇️
serverless-aws-sdk-client 37.16% <ø> (ø)
serverless-aws-sdk-dynamodb 34.14% <ø> (-0.02%) ⬇️
serverless-aws-sdk-eventbridge 27.25% <ø> (-0.07%) ⬇️
serverless-aws-sdk-kinesis 37.40% <ø> (-0.07%) ⬇️
serverless-aws-sdk-lambda 34.59% <ø> (-0.07%) ⬇️
serverless-aws-sdk-s3 32.59% <ø> (-0.07%) ⬇️
serverless-aws-sdk-serverless-peer-service 39.47% <ø> (-0.08%) ⬇️
serverless-aws-sdk-sns 38.25% <ø> (-0.07%) ⬇️
serverless-aws-sdk-sqs 38.00% <ø> (-0.07%) ⬇️
serverless-aws-sdk-stepfunctions 33.18% <ø> (-0.07%) ⬇️
serverless-aws-sdk-util 47.95% <ø> (ø)
serverless-bucket-0 39.46% <ø> (ø)
serverless-lambda 34.33% <ø> (-0.09%) ⬇️
test-optimization-cucumber 52.30% <ø> (+0.11%) ⬆️
test-optimization-cypress 49.41% <ø> (+0.06%) ⬆️
test-optimization-jest 55.34% <ø> (+0.07%) ⬆️
test-optimization-mocha 53.38% <ø> (+0.08%) ⬆️
test-optimization-playwright-playwright-atr 43.33% <ø> (-0.15%) ⬇️
test-optimization-playwright-playwright-efd 43.61% <ø> (+0.08%) ⬆️
test-optimization-playwright-playwright-final-status 43.73% <ø> (+0.08%) ⬆️
test-optimization-playwright-playwright-impacted-tests 43.16% <ø> (ø)
test-optimization-playwright-playwright-reporting 43.26% <ø> (+0.08%) ⬆️
test-optimization-playwright-playwright-test-management 44.72% <ø> (+0.08%) ⬆️
test-optimization-playwright-playwright-test-span 44.51% <ø> (+0.07%) ⬆️
test-optimization-selenium 45.26% <ø> (+0.06%) ⬆️
test-optimization-testopt 48.01% <ø> (+0.08%) ⬆️
test-optimization-vitest 51.00% <ø> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@IlyasShabi
IlyasShabi merged commit f66c176 into master Jul 3, 2026
651 checks passed
@IlyasShabi
IlyasShabi deleted the ishabi/aiguard-integrations branch July 3, 2026 07:53
@dd-octo-sts dd-octo-sts Bot mentioned this pull request Jul 6, 2026
This was referenced Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants