Skip to content

feat(ai-guard): add ai_guard.event tag to the root span#7998

Merged
BridgeAR merged 5 commits intomasterfrom
malvarez/ai-guard-event-tag
Apr 22, 2026
Merged

feat(ai-guard): add ai_guard.event tag to the root span#7998
BridgeAR merged 5 commits intomasterfrom
malvarez/ai-guard-event-tag

Conversation

@manuel-alvarez-alvarez
Copy link
Copy Markdown
Member

@manuel-alvarez-alvarez manuel-alvarez-alvarez commented Apr 14, 2026

What does this PR do?

This PR adds a new ai_guard.event: true tag to the root span of the current trace.

Motivation

The tag is intended to make it easier to quickly locate traces associated with AI Guard events.

Additional Notes

https://datadoghq.atlassian.net/browse/APPSEC-62217

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 14, 2026

Overall package size

Self size: 5.54 MB
Deduped: 6.38 MB
No deduping: 6.38 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.1 | 82.56 kB | 817.39 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.68%. Comparing base (a71f95c) to head (0529b9f).
⚠️ Report is 21 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7998   +/-   ##
=======================================
  Coverage   73.67%   73.68%           
=======================================
  Files         775      775           
  Lines       36215    36216    +1     
=======================================
+ Hits        26682    26684    +2     
+ Misses       9533     9532    -1     
Flag Coverage Δ
aiguard-macos 36.55% <100.00%> (-0.09%) ⬇️
aiguard-ubuntu 36.66% <100.00%> (-0.09%) ⬇️
aiguard-windows 36.46% <100.00%> (-0.09%) ⬇️
apm-capabilities-tracing-macos 48.37% <0.00%> (-0.03%) ⬇️
apm-capabilities-tracing-ubuntu 48.43% <0.00%> (-0.01%) ⬇️
apm-capabilities-tracing-windows 48.19% <0.00%> (+<0.01%) ⬆️
apm-integrations-child-process 36.18% <ø> (-0.10%) ⬇️
apm-integrations-couchbase-18 35.17% <ø> (-0.09%) ⬇️
apm-integrations-couchbase-eol 35.09% <ø> (-0.23%) ⬇️
apm-integrations-oracledb 35.21% <ø> (-0.09%) ⬇️
appsec-express 52.90% <ø> (-0.06%) ⬇️
appsec-fastify 49.38% <ø> (-0.07%) ⬇️
appsec-graphql 49.73% <ø> (-0.07%) ⬇️
appsec-kafka 42.17% <ø> (-0.09%) ⬇️
appsec-ldapjs 41.49% <ø> (-0.08%) ⬇️
appsec-lodash 41.52% <ø> (-0.08%) ⬇️
appsec-macos 56.82% <ø> (-0.07%) ⬇️
appsec-mongodb-core 46.15% <ø> (-0.07%) ⬇️
appsec-mongoose 46.71% <ø> (-0.07%) ⬇️
appsec-mysql 48.86% <ø> (-0.07%) ⬇️
appsec-node-serialize 40.69% <ø> (-0.08%) ⬇️
appsec-passport 44.68% <ø> (-0.08%) ⬇️
appsec-postgres 48.44% <ø> (-0.10%) ⬇️
appsec-sourcing 40.18% <ø> (-0.08%) ⬇️
appsec-stripe 42.41% <ø> (-0.08%) ⬇️
appsec-template 40.86% <ø> (-0.08%) ⬇️
appsec-ubuntu 56.90% <ø> (-0.07%) ⬇️
appsec-windows 56.71% <ø> (-0.05%) ⬇️
instrumentations-instrumentation-bluebird 29.87% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-body-parser 37.77% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-child_process 35.55% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-cookie-parser 31.79% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-express 32.01% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-express-mongo-sanitize 31.91% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-express-session 37.40% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-fs 29.54% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-generic-pool 30.92% <ø> (ø)
instrumentations-instrumentation-http 37.00% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-knex 29.84% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-mongoose 30.94% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-multer 37.54% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-mysql2 35.52% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-passport 41.28% <ø> (-0.08%) ⬇️
instrumentations-instrumentation-passport-http 40.97% <ø> (-0.08%) ⬇️
instrumentations-instrumentation-passport-local 41.47% <ø> (-0.08%) ⬇️
instrumentations-instrumentation-pg 35.05% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-promise 29.80% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-promise-js 29.81% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-q 29.84% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-url 29.80% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-when 29.82% <ø> (-0.10%) ⬇️
llmobs-ai 38.48% <ø> (-0.09%) ⬇️
llmobs-anthropic 37.93% <ø> (-0.09%) ⬇️
llmobs-bedrock 37.18% <ø> (-0.08%) ⬇️
llmobs-google-genai 37.62% <ø> (-0.08%) ⬇️
llmobs-langchain 37.06% <ø> (-0.07%) ⬇️
llmobs-openai 41.30% <ø> (-0.08%) ⬇️
llmobs-vertex-ai 37.79% <ø> (-0.09%) ⬇️
platform-core 30.01% <ø> (ø)
platform-esbuild 32.83% <ø> (ø)
platform-instrumentations-misc 40.09% <ø> (ø)
platform-shimmer 35.73% <ø> (ø)
platform-unit-guardrails 31.38% <ø> (ø)
platform-webpack 20.78% <ø> (ø)
plugins-azure-durable-functions 25.21% <ø> (ø)
plugins-azure-event-hubs 25.36% <ø> (ø)
plugins-azure-service-bus 24.78% <ø> (ø)
plugins-bullmq 40.82% <ø> (+0.02%) ⬆️
plugins-cassandra 35.35% <ø> (-0.09%) ⬇️
plugins-cookie 26.33% <ø> (ø)
plugins-cookie-parser 26.14% <ø> (ø)
plugins-crypto 25.66% <ø> (ø)
plugins-dd-trace-api 35.49% <ø> (-0.09%) ⬇️
plugins-express-mongo-sanitize 26.28% <ø> (ø)
plugins-express-session 26.10% <ø> (ø)
plugins-fastify 39.45% <ø> (-0.09%) ⬇️
plugins-fetch 35.86% <ø> (-0.09%) ⬇️
plugins-fs 35.77% <ø> (-0.10%) ⬇️
plugins-generic-pool 25.25% <ø> (ø)
plugins-google-cloud-pubsub 43.12% <ø> (-0.08%) ⬇️
plugins-grpc 38.13% <ø> (-0.09%) ⬇️
plugins-handlebars 26.32% <ø> (ø)
plugins-hapi 37.37% <ø> (-0.09%) ⬇️
plugins-hono 37.61% <ø> (-0.09%) ⬇️
plugins-ioredis 35.81% <ø> (-0.09%) ⬇️
plugins-knex 26.01% <ø> (ø)
plugins-langgraph 35.16% <ø> (-0.09%) ⬇️
plugins-ldapjs 23.88% <ø> (ø)
plugins-light-my-request 25.75% <ø> (ø)
plugins-limitd-client 30.08% <ø> (-0.10%) ⬇️
plugins-lodash 25.33% <ø> (ø)
plugins-mariadb 36.69% <ø> (-0.14%) ⬇️
plugins-memcached 35.46% <ø> (-0.09%) ⬇️
plugins-microgateway-core 36.45% <ø> (-0.09%) ⬇️
plugins-moleculer 38.16% <ø> (-0.09%) ⬇️
plugins-mongodb 36.55% <ø> (-0.09%) ⬇️
plugins-mongodb-core 36.27% <ø> (-0.09%) ⬇️
plugins-mongoose 36.14% <ø> (-0.09%) ⬇️
plugins-multer 26.10% <ø> (ø)
plugins-mysql 36.55% <ø> (-0.09%) ⬇️
plugins-mysql2 36.53% <ø> (-0.09%) ⬇️
plugins-node-serialize 26.37% <ø> (ø)
plugins-opensearch 35.11% <ø> (-0.09%) ⬇️
plugins-passport-http 26.16% <ø> (ø)
plugins-postgres 34.50% <ø> (-0.09%) ⬇️
plugins-process 25.66% <ø> (ø)
plugins-pug 26.33% <ø> (ø)
plugins-redis 36.02% <ø> (-0.09%) ⬇️
plugins-router 40.02% <ø> (-0.09%) ⬇️
plugins-sequelize 25.03% <ø> (ø)
plugins-test-and-upstream-amqp10 35.78% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-amqplib 40.97% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-apollo 36.63% <ø> (-0.08%) ⬇️
plugins-test-and-upstream-avsc 35.63% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-bunyan 31.23% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-connect 37.96% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-graphql 37.32% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-koa 37.57% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-protobufjs 35.84% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-rhea 41.05% <ø> (-0.09%) ⬇️
plugins-undici 36.64% <ø> (-0.09%) ⬇️
plugins-url 25.66% <ø> (ø)
plugins-valkey 35.49% <ø> (-0.09%) ⬇️
plugins-vm 25.66% <ø> (ø)
plugins-winston 31.67% <ø> (+0.04%) ⬆️
plugins-ws 39.09% <ø> (-0.09%) ⬇️
profiling-macos 38.04% <ø> (-0.09%) ⬇️
profiling-ubuntu 38.20% <ø> (-0.09%) ⬇️
profiling-windows 39.57% <ø> (-0.09%) ⬇️
serverless-azure-functions-client 25.10% <ø> (ø)
serverless-azure-functions-eventhubs 25.10% <ø> (ø)
serverless-azure-functions-servicebus 25.10% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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.

@datadog-prod-us1-5
Copy link
Copy Markdown

datadog-prod-us1-5 Bot commented Apr 14, 2026

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 68.06% (+0.00%)

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

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Apr 14, 2026

Benchmarks

Benchmark execution time: 2026-04-21 10:23:43

Comparing candidate commit 0529b9f in PR branch malvarez/ai-guard-event-tag with baseline commit a71f95c in branch master.

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

@manuel-alvarez-alvarez manuel-alvarez-alvarez marked this pull request as ready for review April 16, 2026 08:09
@manuel-alvarez-alvarez manuel-alvarez-alvarez requested a review from a team as a code owner April 16, 2026 08:09
Copy link
Copy Markdown
Contributor

@IlyasShabi IlyasShabi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM: Do you have a PR for ST?

@manuel-alvarez-alvarez
Copy link
Copy Markdown
Member Author

LGTM: Do you have a PR for ST?

Yep, here you are : DataDog/system-tests#6779

@BridgeAR BridgeAR merged commit 4882a30 into master Apr 22, 2026
897 of 899 checks passed
@BridgeAR BridgeAR deleted the malvarez/ai-guard-event-tag branch April 22, 2026 17:14
@dd-octo-sts dd-octo-sts Bot mentioned this pull request Apr 23, 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.

3 participants