Skip to content

[APPSEC] use http endpoint on api security sampling algorithm when route is not available#7062

Merged
IlyasShabi merged 7 commits intomasterfrom
ishabi/http-endpoint-sampling-algorithm
Mar 12, 2026
Merged

[APPSEC] use http endpoint on api security sampling algorithm when route is not available#7062
IlyasShabi merged 7 commits intomasterfrom
ishabi/http-endpoint-sampling-algorithm

Conversation

@IlyasShabi
Copy link
Copy Markdown
Contributor

@IlyasShabi IlyasShabi commented Dec 9, 2025

What does this PR do?

APPSEC-59788

Use http.endpoint for api security sampling algorithm on schema collection when the route is not available

Tasks

  • Add logic on tracer
  • Unit tests
  • Integration tests with http server

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 9, 2025

Overall package size

Self size: 4.96 MB
Deduped: 5.8 MB
No deduping: 5.8 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.0 | 81.15 kB | 815.98 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 Dec 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.42%. Comparing base (1cdd51b) to head (cc789e9).
⚠️ Report is 58 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7062      +/-   ##
==========================================
+ Coverage   80.31%   80.42%   +0.10%     
==========================================
  Files         739      741       +2     
  Lines       31946    32131     +185     
==========================================
+ Hits        25657    25840     +183     
- Misses       6289     6291       +2     
Flag Coverage Δ
aiguard-macos 38.84% <0.00%> (-0.16%) ⬇️
aiguard-ubuntu 38.95% <0.00%> (-0.16%) ⬇️
aiguard-windows 38.68% <0.00%> (-0.17%) ⬇️
apm-capabilities-tracing-macos 48.84% <41.17%> (+0.08%) ⬆️
apm-capabilities-tracing-ubuntu 48.88% <41.17%> (+0.07%) ⬆️
apm-capabilities-tracing-windows 48.61% <41.17%> (+0.07%) ⬆️
apm-integrations-child-process 38.40% <0.00%> (-0.18%) ⬇️
apm-integrations-couchbase-18 37.32% <0.00%> (-0.05%) ⬇️
apm-integrations-couchbase-eol 37.78% <0.00%> (-0.06%) ⬇️
apm-integrations-oracledb 37.62% <0.00%> (-0.19%) ⬇️
appsec-express 55.17% <81.08%> (-0.21%) ⬇️
appsec-fastify 51.52% <72.97%> (-0.19%) ⬇️
appsec-graphql 51.71% <78.37%> (-0.18%) ⬇️
appsec-kafka 44.24% <0.00%> (-0.15%) ⬇️
appsec-ldapjs 43.90% <37.50%> (-0.18%) ⬇️
appsec-lodash 43.56% <37.50%> (-0.18%) ⬇️
appsec-macos 58.30% <86.48%> (-0.07%) ⬇️
appsec-mongodb-core 48.68% <45.83%> (-0.10%) ⬇️
appsec-mongoose 49.33% <37.50%> (-0.22%) ⬇️
appsec-mysql 50.78% <81.08%> (-0.15%) ⬇️
appsec-node-serialize 43.08% <37.50%> (-0.18%) ⬇️
appsec-passport 47.52% <67.56%> (-0.18%) ⬇️
appsec-postgres 50.50% <72.97%> (-0.18%) ⬇️
appsec-sourcing 42.48% <37.50%> (-0.17%) ⬇️
appsec-template 43.24% <37.50%> (-0.18%) ⬇️
appsec-ubuntu 58.38% <86.48%> (-0.07%) ⬇️
appsec-windows 58.14% <86.48%> (-0.10%) ⬇️
instrumentations-instrumentation-bluebird 32.27% <0.00%> (-0.13%) ⬇️
instrumentations-instrumentation-body-parser 40.38% <37.50%> (-0.17%) ⬇️
instrumentations-instrumentation-child_process 37.71% <0.00%> (-0.19%) ⬇️
instrumentations-instrumentation-cookie-parser 34.24% <0.00%> (-0.14%) ⬇️
instrumentations-instrumentation-express 34.56% <0.00%> (-0.15%) ⬇️
instrumentations-instrumentation-express-mongo-sanitize 34.37% <0.00%> (-0.14%) ⬇️
instrumentations-instrumentation-express-session 40.01% <37.50%> (-0.16%) ⬇️
instrumentations-instrumentation-fs 31.88% <0.00%> (-0.12%) ⬇️
instrumentations-instrumentation-generic-pool 29.89% <ø> (+0.18%) ⬆️
instrumentations-instrumentation-http 39.69% <0.00%> (-0.21%) ⬇️
instrumentations-instrumentation-knex 32.27% <0.00%> (-0.13%) ⬇️
instrumentations-instrumentation-mongoose 33.40% <0.00%> (-0.13%) ⬇️
instrumentations-instrumentation-multer 40.13% <37.50%> (-0.16%) ⬇️
instrumentations-instrumentation-mysql2 38.17% <0.00%> (-0.20%) ⬇️
instrumentations-instrumentation-passport 43.94% <75.67%> (-0.13%) ⬇️
instrumentations-instrumentation-passport-http 43.61% <72.97%> (-0.13%) ⬇️
instrumentations-instrumentation-passport-local 44.14% <75.67%> (-0.14%) ⬇️
instrumentations-instrumentation-pg 37.61% <0.00%> (-0.19%) ⬇️
instrumentations-instrumentation-promise 32.20% <0.00%> (-0.13%) ⬇️
instrumentations-instrumentation-promise-js 32.20% <0.00%> (-0.13%) ⬇️
instrumentations-instrumentation-q 32.25% <0.00%> (-0.13%) ⬇️
instrumentations-instrumentation-url 32.17% <0.00%> (-0.13%) ⬇️
instrumentations-instrumentation-when 32.22% <0.00%> (-0.13%) ⬇️
llmobs-ai 42.16% <0.00%> (-0.03%) ⬇️
llmobs-anthropic 40.15% <0.00%> (-0.22%) ⬇️
llmobs-bedrock 39.13% <0.00%> (-0.18%) ⬇️
llmobs-google-genai 39.69% <0.00%> (-0.20%) ⬇️
llmobs-langchain 39.93% <0.00%> (-0.01%) ⬇️
llmobs-openai 43.87% <0.00%> (-0.32%) ⬇️
llmobs-vertex-ai 39.87% <0.00%> (-0.21%) ⬇️
platform-core 31.53% <ø> (ø)
platform-esbuild 34.48% <ø> (ø)
platform-instrumentations-misc 48.40% <ø> (+2.87%) ⬆️
platform-shimmer 37.63% <ø> (ø)
platform-unit-guardrails 32.95% <ø> (ø)
plugins-azure-event-hubs 25.83% <ø> (ø)
plugins-azure-service-bus 25.19% <ø> (ø)
plugins-bullmq 44.12% <0.00%> (+0.05%) ⬆️
plugins-cassandra 37.66% <0.00%> (-0.19%) ⬇️
plugins-cookie 26.89% <ø> (ø)
plugins-cookie-parser 26.67% <ø> (ø)
plugins-crypto 26.79% <ø> (ø)
plugins-dd-trace-api 38.23% <0.00%> (-0.21%) ⬇️
plugins-express-mongo-sanitize 26.82% <ø> (ø)
plugins-express-session 26.63% <ø> (ø)
plugins-fastify 42.09% <37.50%> (-0.19%) ⬇️
plugins-fetch 38.22% <0.00%> (-0.17%) ⬇️
plugins-fs 38.50% <0.00%> (-0.19%) ⬇️
plugins-generic-pool 25.87% <ø> (ø)
plugins-google-cloud-pubsub 45.27% <37.50%> (-0.15%) ⬇️
plugins-grpc 40.77% <0.00%> (-0.22%) ⬇️
plugins-handlebars 26.86% <ø> (ø)
plugins-hapi 40.01% <37.50%> (-0.18%) ⬇️
plugins-hono 40.27% <37.50%> (-0.18%) ⬇️
plugins-ioredis 38.31% <0.00%> (-0.18%) ⬇️
plugins-knex 26.50% <ø> (ø)
plugins-ldapjs 24.36% <ø> (ø)
plugins-light-my-request 26.23% <ø> (ø)
plugins-limitd-client 32.54% <0.00%> (-0.14%) ⬇️
plugins-lodash 25.96% <ø> (ø)
plugins-mariadb 39.36% <0.00%> (-0.20%) ⬇️
plugins-memcached 38.03% <0.00%> (-0.21%) ⬇️
plugins-microgateway-core 39.08% <45.83%> (-0.16%) ⬇️
plugins-moleculer 40.37% <0.00%> (-0.19%) ⬇️
plugins-mongodb 39.05% <0.00%> (-0.21%) ⬇️
plugins-mongodb-core 38.88% <0.00%> (-0.22%) ⬇️
plugins-mongoose 38.74% <0.00%> (-0.18%) ⬇️
plugins-multer 26.63% <ø> (ø)
plugins-mysql 39.04% <0.00%> (-0.19%) ⬇️
plugins-mysql2 39.14% <0.00%> (-0.19%) ⬇️
plugins-node-serialize 26.93% <ø> (ø)
plugins-opensearch 37.50% <0.00%> (-0.19%) ⬇️
plugins-passport-http 26.68% <ø> (ø)
plugins-postgres 35.62% <0.00%> (-0.16%) ⬇️
plugins-process 26.79% <ø> (ø)
plugins-pug 26.89% <ø> (ø)
plugins-redis 38.77% <0.00%> (-0.19%) ⬇️
plugins-router 42.96% <45.83%> (-0.06%) ⬇️
plugins-sequelize 25.47% <ø> (ø)
plugins-test-and-upstream-amqp10 38.39% <0.00%> (-0.03%) ⬇️
plugins-test-and-upstream-amqplib 43.71% <0.00%> (-0.17%) ⬇️
plugins-test-and-upstream-apollo 39.01% <0.00%> (-0.07%) ⬇️
plugins-test-and-upstream-avsc 38.56% <0.00%> (-0.22%) ⬇️
plugins-test-and-upstream-bunyan 33.80% <0.00%> (-0.16%) ⬇️
plugins-test-and-upstream-connect 40.67% <45.83%> (-0.18%) ⬇️
plugins-test-and-upstream-graphql 40.00% <0.00%> (-0.20%) ⬇️
plugins-test-and-upstream-koa 40.26% <45.83%> (-0.17%) ⬇️
plugins-test-and-upstream-protobufjs 38.78% <0.00%> (-0.22%) ⬇️
plugins-test-and-upstream-rhea 43.88% <0.00%> (-0.23%) ⬇️
plugins-undici 39.00% <0.00%> (-0.17%) ⬇️
plugins-url 26.79% <ø> (ø)
plugins-valkey 37.97% <0.00%> (-0.18%) ⬇️
plugins-vm 26.79% <ø> (ø)
plugins-winston 34.00% <0.00%> (-0.15%) ⬇️
plugins-ws 41.72% <0.00%> (-0.21%) ⬇️
profiling-macos 39.80% <0.00%> (-0.09%) ⬇️
profiling-ubuntu 39.93% <0.00%> (-0.09%) ⬇️
profiling-windows 41.12% <0.00%> (-0.11%) ⬇️
serverless-azure-functions-client 25.54% <ø> (ø)
serverless-azure-functions-eventhubs 25.54% <ø> (ø)
serverless-azure-functions-servicebus 25.54% <ø> (ø)

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.

@IlyasShabi IlyasShabi changed the title use http endpoint on api security sampling algorithm when route is not available [APPSEC] use http endpoint on api security sampling algorithm when route is not available Dec 9, 2025
@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Mar 2, 2026

Benchmarks

Benchmark execution time: 2026-03-12 10:27:10

Comparing candidate commit cc789e9 in PR branch ishabi/http-endpoint-sampling-algorithm with baseline commit 1cdd51b in branch master.

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

@IlyasShabi IlyasShabi force-pushed the ishabi/http-endpoint-sampling-algorithm branch from 7567808 to 1394ac4 Compare March 4, 2026 12:51
@datadog-datadog-prod-us1

This comment has been minimized.

@IlyasShabi IlyasShabi force-pushed the ishabi/http-endpoint-sampling-algorithm branch from a83abbd to 29be87f Compare March 4, 2026 14:58
@IlyasShabi IlyasShabi marked this pull request as ready for review March 5, 2026 08:12
@IlyasShabi IlyasShabi requested a review from a team as a code owner March 5, 2026 08:12
Copy link
Copy Markdown
Contributor

@CarlesDD CarlesDD left a comment

Choose a reason for hiding this comment

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

Besides the existing comment on the PR, LGTM

@simon-id
Copy link
Copy Markdown
Member

same, LGTM other than the remaining TODO

@IlyasShabi IlyasShabi requested a review from a team as a code owner March 12, 2026 09:07
@IlyasShabi IlyasShabi requested review from CarlesDD and simon-id March 12, 2026 09:09
Copy link
Copy Markdown
Member

@simon-id simon-id left a comment

Choose a reason for hiding this comment

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

I committed a lint fix but LGTM now

@IlyasShabi IlyasShabi merged commit b9ea9c5 into master Mar 12, 2026
789 checks passed
@IlyasShabi IlyasShabi deleted the ishabi/http-endpoint-sampling-algorithm branch March 12, 2026 10:49
dd-octo-sts bot pushed a commit that referenced this pull request Mar 13, 2026
…ute is not available (#7062)

Use http endpoint on api security sampling algorithm when route is not available
@dd-octo-sts dd-octo-sts bot mentioned this pull request Mar 13, 2026
CarlesDD pushed a commit that referenced this pull request Mar 16, 2026
…ute is not available (#7062)

Use http endpoint on api security sampling algorithm when route is not available
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