Skip to content

add support for oxc parsing in the rewriter#7619

Merged
rochdev merged 9 commits intomasterfrom
oxc-parser
Mar 4, 2026
Merged

add support for oxc parsing in the rewriter#7619
rochdev merged 9 commits intomasterfrom
oxc-parser

Conversation

@rochdev
Copy link
Copy Markdown
Member

@rochdev rochdev commented Feb 25, 2026

What does this PR do?

Add support for OXC parsing in the rewriter.

Motivation

OXC is much faster than Meriyah (or any other JavaScript implementation) at parsing.

Additional Notes

Unlike other native addons, this one is shipped as a single prebuild for the current platform instead of prebuilds for all platforms. This is because in cases where it's not available, we can fallback to the JS implementation, so the size trade-off is not worth it. Basically, this is just an optimization for the most frequent case where the tracer is installed on the same platform it is deployed.

This brings us closer to the proposal that will be made to upstream the new rewriter to Orchestrion, and ultimately the parsing to Node.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 25, 2026

Overall package size

Self size: 4.91 MB
Deduped: 5.75 MB
No deduping: 5.75 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 2.0.6 | 81.92 kB | 816.75 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 Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.15%. Comparing base (2c69381) to head (14d5d23).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7619      +/-   ##
==========================================
- Coverage   80.18%   78.15%   -2.03%     
==========================================
  Files         739      737       -2     
  Lines       31926    31893      -33     
==========================================
- Hits        25599    24926     -673     
- Misses       6327     6967     +640     
Flag Coverage Δ
aiguard-macos 38.89% <14.70%> (-0.14%) ⬇️
aiguard-ubuntu 39.01% <14.70%> (-0.14%) ⬇️
aiguard-windows 38.75% <14.70%> (-0.14%) ⬇️
apm-capabilities-tracing-macos 48.76% <14.70%> (-0.03%) ⬇️
apm-capabilities-tracing-ubuntu ?
apm-capabilities-tracing-windows 48.53% <14.70%> (-0.03%) ⬇️
apm-integrations-child-process 38.48% <14.70%> (-0.14%) ⬇️
apm-integrations-couchbase-18 37.41% <14.70%> (-0.13%) ⬇️
apm-integrations-couchbase-eol 37.88% <14.70%> (-0.14%) ⬇️
apm-integrations-oracledb 37.72% <14.70%> (-0.13%) ⬇️
appsec-express 55.31% <14.70%> (-0.12%) ⬇️
appsec-fastify 51.63% <14.70%> (-0.12%) ⬇️
appsec-graphql 51.82% <14.70%> (-0.11%) ⬇️
appsec-kafka 44.30% <14.70%> (-0.18%) ⬇️
appsec-ldapjs 44.00% <14.70%> (-0.12%) ⬇️
appsec-lodash 43.65% <14.70%> (-0.12%) ⬇️
appsec-macos 58.30% <14.70%> (-0.12%) ⬇️
appsec-mongodb-core 48.81% <14.70%> (-0.12%) ⬇️
appsec-mongoose 49.49% <14.70%> (?)
appsec-mysql 50.85% <14.70%> (?)
appsec-node-serialize 43.17% <14.70%> (-0.12%) ⬇️
appsec-passport ?
appsec-postgres 50.58% <14.70%> (-0.12%) ⬇️
appsec-sourcing 42.57% <14.70%> (-0.12%) ⬇️
appsec-template 43.34% <14.70%> (-0.12%) ⬇️
appsec-ubuntu 58.38% <14.70%> (-0.12%) ⬇️
appsec-windows 58.15% <14.70%> (-0.14%) ⬇️
instrumentations-instrumentation-bluebird 32.29% <14.70%> (-0.13%) ⬇️
instrumentations-instrumentation-body-parser 40.45% <14.70%> (-0.13%) ⬇️
instrumentations-instrumentation-child_process 37.80% <14.70%> (-0.14%) ⬇️
instrumentations-instrumentation-cookie-parser 34.29% <14.70%> (-0.12%) ⬇️
instrumentations-instrumentation-express 34.62% <14.70%> (-0.12%) ⬇️
instrumentations-instrumentation-express-mongo-sanitize 34.42% <14.70%> (-0.12%) ⬇️
instrumentations-instrumentation-express-session 40.08% <14.70%> (-0.13%) ⬇️
instrumentations-instrumentation-fs 31.90% <14.70%> (-0.13%) ⬇️
instrumentations-instrumentation-generic-pool 29.70% <14.70%> (-0.05%) ⬇️
instrumentations-instrumentation-http ?
instrumentations-instrumentation-knex 32.29% <14.70%> (-0.13%) ⬇️
instrumentations-instrumentation-mongoose 33.43% <14.70%> (-0.12%) ⬇️
instrumentations-instrumentation-multer 40.20% <14.70%> (-0.13%) ⬇️
instrumentations-instrumentation-mysql2 38.27% <14.70%> (-0.14%) ⬇️
instrumentations-instrumentation-passport 43.98% <14.70%> (-0.13%) ⬇️
instrumentations-instrumentation-passport-http 43.65% <14.70%> (-0.13%) ⬇️
instrumentations-instrumentation-passport-local 44.19% <14.70%> (-0.13%) ⬇️
instrumentations-instrumentation-pg 37.70% <14.70%> (-0.14%) ⬇️
instrumentations-instrumentation-promise 32.22% <14.70%> (-0.13%) ⬇️
instrumentations-instrumentation-promise-js 32.23% <14.70%> (-0.13%) ⬇️
instrumentations-instrumentation-q 32.27% <14.70%> (-0.13%) ⬇️
instrumentations-instrumentation-url 32.19% <14.70%> (-0.13%) ⬇️
instrumentations-instrumentation-when 32.24% <14.70%> (-0.13%) ⬇️
llmobs-ai 42.10% <100.00%> (+0.04%) ⬆️
llmobs-anthropic 40.27% <14.70%> (-0.13%) ⬇️
llmobs-bedrock 39.22% <14.70%> (-0.12%) ⬇️
llmobs-google-genai 39.80% <14.70%> (-0.12%) ⬇️
llmobs-langchain 39.86% <100.00%> (+0.02%) ⬆️
llmobs-openai ?
llmobs-vertex-ai 40.06% <14.70%> (-0.13%) ⬇️
platform-core 31.53% <ø> (ø)
platform-esbuild 34.48% <ø> (ø)
platform-instrumentations-misc 45.53% <100.00%> (+1.52%) ⬆️
platform-shimmer 37.63% <ø> (ø)
platform-unit-guardrails 32.95% <ø> (ø)
plugins-azure-event-hubs 25.83% <ø> (ø)
plugins-azure-service-bus 25.19% <ø> (ø)
plugins-bullmq 43.99% <100.00%> (+0.03%) ⬆️
plugins-cassandra 37.90% <14.70%> (+0.01%) ⬆️
plugins-cookie 26.89% <ø> (ø)
plugins-cookie-parser 26.67% <ø> (ø)
plugins-crypto 26.79% <ø> (ø)
plugins-dd-trace-api 38.34% <14.70%> (-0.14%) ⬇️
plugins-express-mongo-sanitize 26.82% <ø> (ø)
plugins-express-session 26.63% <ø> (ø)
plugins-fastify 42.19% <14.70%> (-0.13%) ⬇️
plugins-fetch 38.30% <14.70%> (-0.13%) ⬇️
plugins-fs 38.58% <14.70%> (-0.14%) ⬇️
plugins-generic-pool 25.87% <ø> (ø)
plugins-google-cloud-pubsub 45.33% <14.70%> (-0.13%) ⬇️
plugins-grpc 40.90% <14.70%> (-0.13%) ⬇️
plugins-handlebars 26.86% <ø> (ø)
plugins-hapi 40.09% <14.70%> (-0.14%) ⬇️
plugins-hono 40.35% <14.70%> (-0.13%) ⬇️
plugins-ioredis 38.39% <14.70%> (-0.14%) ⬇️
plugins-knex 26.50% <ø> (ø)
plugins-ldapjs 24.36% <ø> (ø)
plugins-light-my-request 26.23% <ø> (ø)
plugins-limitd-client 32.58% <14.70%> (-0.13%) ⬇️
plugins-lodash 25.96% <ø> (ø)
plugins-mariadb 39.45% <14.70%> (-0.14%) ⬇️
plugins-memcached 38.14% <14.70%> (-0.14%) ⬇️
plugins-microgateway-core 39.13% <14.70%> (-0.13%) ⬇️
plugins-moleculer 40.47% <14.70%> (-0.13%) ⬇️
plugins-mongodb 39.16% <14.70%> (-0.13%) ⬇️
plugins-mongodb-core 38.99% <14.70%> (-0.14%) ⬇️
plugins-mongoose 38.82% <14.70%> (-0.13%) ⬇️
plugins-multer 26.63% <ø> (ø)
plugins-mysql 39.13% <14.70%> (-0.14%) ⬇️
plugins-mysql2 39.23% <14.70%> (-0.14%) ⬇️
plugins-node-serialize 26.93% <ø> (ø)
plugins-opensearch 37.59% <14.70%> (-0.13%) ⬇️
plugins-passport-http 26.68% <ø> (ø)
plugins-postgres 35.69% <14.70%> (-0.11%) ⬇️
plugins-process 26.79% <ø> (ø)
plugins-pug 26.89% <ø> (ø)
plugins-redis 38.71% <14.70%> (-0.28%) ⬇️
plugins-router 42.92% <14.70%> (-0.28%) ⬇️
plugins-sequelize 25.47% <ø> (ø)
plugins-test-and-upstream-amqp10 38.46% <14.70%> (-0.14%) ⬇️
plugins-test-and-upstream-amqplib 43.78% <14.70%> (-0.15%) ⬇️
plugins-test-and-upstream-apollo ?
plugins-test-and-upstream-avsc 38.67% <14.70%> (-0.14%) ⬇️
plugins-test-and-upstream-bunyan 33.86% <14.70%> (-0.13%) ⬇️
plugins-test-and-upstream-connect 40.75% <14.70%> (-0.14%) ⬇️
plugins-test-and-upstream-graphql 40.10% <14.70%> (-0.14%) ⬇️
plugins-test-and-upstream-koa 40.33% <14.70%> (-0.14%) ⬇️
plugins-test-and-upstream-protobufjs 38.90% <14.70%> (-0.14%) ⬇️
plugins-test-and-upstream-rhea 43.97% <14.70%> (-0.18%) ⬇️
plugins-undici 39.08% <14.70%> (-0.13%) ⬇️
plugins-url 26.79% <ø> (ø)
plugins-valkey 38.05% <14.70%> (-0.11%) ⬇️
plugins-vm 26.79% <ø> (ø)
plugins-winston 34.05% <14.70%> (-0.13%) ⬇️
plugins-ws 41.84% <14.70%> (-0.14%) ⬇️
profiling-macos 39.80% <14.70%> (-0.14%) ⬇️
profiling-ubuntu 39.92% <14.70%> (-0.14%) ⬇️
profiling-windows 41.13% <14.70%> (-0.14%) ⬇️
serverless-azure-functions-client 25.54% <ø> (ø)
serverless-azure-functions-eventhubs ?
serverless-azure-functions-servicebus ?

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-datadog-prod-us1

This comment has been minimized.

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Feb 25, 2026

Benchmarks

Benchmark execution time: 2026-03-04 18:58:55

Comparing candidate commit 14d5d23 in PR branch oxc-parser with baseline commit 2c69381 in branch master.

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

@rochdev rochdev changed the title add support for oxc parsing add support for oxc parsing in the rewriter Feb 25, 2026
@rochdev rochdev marked this pull request as ready for review February 25, 2026 17:21
@rochdev rochdev requested review from a team as code owners February 25, 2026 17:21
@rochdev rochdev requested a review from a team as a code owner March 3, 2026 16:29
pabloerhard
pabloerhard previously approved these changes Mar 4, 2026
@rochdev rochdev merged commit 1cdd51b into master Mar 4, 2026
1115 of 1118 checks passed
@rochdev rochdev deleted the oxc-parser branch March 4, 2026 20:56
dd-octo-sts Bot pushed a commit that referenced this pull request Mar 5, 2026
@dd-octo-sts dd-octo-sts Bot mentioned this pull request Mar 5, 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