Skip to content

feat(graphql): trace graphql-jit executions - #9343

Merged
BridgeAR merged 25 commits into
masterfrom
BridgeAR/2026-07-14-trace-graphql-jit
Aug 31, 2026
Merged

feat(graphql): trace graphql-jit executions#9343
BridgeAR merged 25 commits into
masterfrom
BridgeAR/2026-07-14-trace-graphql-jit

Conversation

@BridgeAR

Copy link
Copy Markdown
Member

Summary

graphql-jit bypasses graphql.execute after compilation, which drops GraphQL spans on warm requests. This instruments compiled queries across the supported 0.7.x and 0.8.x CJS and ESM layouts so execute and resolve spans, pre-execution blocking, and Mercurius request metadata stay available.

Test plan

  • Run the GraphQL, Mercurius, ESM, lint, and changed-line coverage suites.

Fixes: #2385

@dd-octo-sts

dd-octo-sts Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 8.63 MB
Deduped: 9.3 MB
No deduping: 9.3 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.4.0 | 127.33 kB | 447.04 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

@pr-commenter

pr-commenter Bot commented Jul 14, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-08-31 16:45:06

Comparing candidate commit 3dcd795 in PR branch BridgeAR/2026-07-14-trace-graphql-jit with baseline commit 6a33039 in branch master.

📊 Benchmarking dashboard

Found 1 performance improvements and 1 performance regressions! Performance is the same for 2296 metrics, 12 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 ----------------------------------'

scenario:plugin-graphql-long-with-depth-on-max-20

  • 🟩 instructions [-3.2G instructions; -1.2G instructions] or [-6.203%; -2.323%]

scenario:plugin-graphql-long-with-depth-on-max-26

  • 🟥 instructions [+0.7G instructions; +1.8G instructions] or [+2.430%; +6.301%]

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 max_rss_usage [-30.415MB; +55.334MB] or [-15.626%; +28.429%]

scenario:appsec-iast-with-vulnerability-iast-enabled-default-config-20

  • unstable max_rss_usage [-20.037MB; +46.617MB] or [-5.244%; +12.201%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-166.991ms; +483.023ms] or [-3.316%; +9.591%]
  • unstable execution_time [-167.758ms; +482.252ms] or [-3.281%; +9.432%]
  • unstable throughput [-161441.747op/s; +55022.094op/s] or [-9.830%; +3.350%]

scenario:llmobs-encode-unicode-mixed-20

  • unstable max_rss_usage [-7700.163KB; +7716.163KB] or [-9.661%; +9.681%]

scenario:plugin-graphql-long-with-depth-on-max-20

  • unstable max_rss_usage [-31.598MB; -10.356MB] or [-19.981%; -6.549%]
  • unstable throughput [+0.519op/s; +8.036op/s] or [+0.708%; +10.967%]

scenario:plugin-pg-service-26

  • unstable cpu_usage_percentage [-7.330%; +4.523%]
  • unstable execution_time [-59.091ms; +91.501ms] or [-6.457%; +9.998%]
  • unstable throughput [-490124.380op/s; +318474.759op/s] or [-7.374%; +4.791%]

scenario:test-optimization-large-suite-20

  • unstable max_rss_usage [-4216.890KB; +4134.223KB] or [-5.334%; +5.230%]

@datadog-datadog-prod-us1

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

Copy link
Copy Markdown

Tests

All CI checks and tests passed.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 98.63% (+0.02%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 3dcd795 | Docs | View more details | Give us feedback!

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.62%. Comparing base (6a33039) to head (3dcd795).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9343      +/-   ##
==========================================
+ Coverage   98.61%   98.62%   +0.01%     
==========================================
  Files         993      996       +3     
  Lines      150186   151955    +1769     
  Branches    13603    13211     -392     
==========================================
+ Hits       148099   149869    +1770     
+ Misses       2087     2086       -1     
Flag Coverage Δ
aiguard 63.13% <40.68%> (-0.31%) ⬇️
aiguard-integration 58.99% <40.68%> (-0.20%) ⬇️
apm-bucket-0 62.49% <40.68%> (-0.31%) ⬇️
apm-bucket-1 67.93% <40.68%> (-0.33%) ⬇️
apm-bucket-2 67.49% <40.68%> (-0.36%) ⬇️
apm-bucket-3 64.34% <40.68%> (-0.32%) ⬇️
apm-capabilities-tracing 62.55% <39.29%> (-0.35%) ⬇️
apm-integrations-aerospike 60.50% <40.68%> (-0.29%) ⬇️
apm-integrations-confluentinc-kafka-javascript 66.62% <40.68%> (-0.32%) ⬇️
apm-integrations-couchbase 61.01% <40.68%> (-0.30%) ⬇️
apm-integrations-http 66.21% <40.68%> (-0.31%) ⬇️
apm-integrations-kafkajs 67.20% <40.68%> (-0.36%) ⬇️
apm-integrations-next 63.83% <40.68%> (-0.31%) ⬇️
apm-integrations-prisma 61.89% <40.68%> (-0.26%) ⬇️
appsec 76.73% <40.68%> (-0.37%) ⬇️
appsec-express_fastify_graphql 72.68% <55.89%> (-0.85%) ⬇️
appsec-integration 49.51% <51.80%> (-0.05%) ⬇️
appsec-kafka_ldapjs_lodash 67.47% <40.68%> (-0.31%) ⬇️
appsec-mongodb-core_mongoose_mysql 70.63% <40.68%> (-0.29%) ⬇️
appsec-next 57.12% <40.68%> (-0.18%) ⬇️
appsec-node-serialize_passport_postgres 70.10% <40.68%> (-0.30%) ⬇️
appsec-sourcing_stripe_template 68.52% <40.68%> (-0.29%) ⬇️
debugger 69.07% <40.68%> (-0.33%) ⬇️
instrumentations-bucket-0 56.07% <40.68%> (-0.24%) ⬇️
instrumentations-bucket-1 64.16% <40.68%> (-0.31%) ⬇️
instrumentations-bucket-10 53.28% <40.68%> (-0.19%) ⬇️
instrumentations-bucket-11 65.61% <40.68%> (-0.30%) ⬇️
instrumentations-bucket-12 61.38% <40.68%> (-0.30%) ⬇️
instrumentations-bucket-13 56.27% <40.68%> (-0.24%) ⬇️
instrumentations-bucket-14 55.72% <40.68%> (-0.23%) ⬇️
instrumentations-bucket-2 56.92% <40.68%> (-0.23%) ⬇️
instrumentations-bucket-3 57.13% <40.68%> (-0.23%) ⬇️
instrumentations-bucket-4 63.77% <40.68%> (-0.31%) ⬇️
instrumentations-bucket-5 56.52% <40.68%> (-0.25%) ⬇️
instrumentations-bucket-6 58.12% <40.68%> (-0.20%) ⬇️
instrumentations-bucket-7 65.65% <40.68%> (-0.34%) ⬇️
instrumentations-bucket-8 62.91% <40.68%> (-0.30%) ⬇️
instrumentations-bucket-9 64.51% <40.68%> (-0.31%) ⬇️
instrumentations-instrumentation-couchbase 54.68% <40.68%> (-0.23%) ⬇️
instrumentations-instrumentation-zlib 55.75% <40.68%> (-0.24%) ⬇️
instrumentations-integration-esbuild 34.49% <41.74%> (+0.02%) ⬆️
llmobs-ai_anthropic_bedrock 66.66% <40.68%> (-0.28%) ⬇️
llmobs-bucket-1 64.80% <40.68%> (-0.25%) ⬇️
llmobs-openai 66.68% <40.68%> (-0.31%) ⬇️
llmobs-openai-agents_vertex-ai 63.92% <40.68%> (-0.27%) ⬇️
llmobs-sdk 76.02% <40.68%> (-0.46%) ⬇️
master-coverage 98.62% <100.00%> (?)
openfeature 59.58% <40.68%> (-0.24%) ⬇️
openfeature-unit 58.26% <40.68%> (-0.26%) ⬇️
platform-core_esbuild_instrumentations-misc 41.06% <41.74%> (-0.03%) ⬇️
platform-integration 64.80% <40.68%> (-0.26%) ⬇️
platform-shimmer_unit-guardrails_webpack 38.89% <41.74%> (-0.02%) ⬇️
plugins-browser-bunyan_bullmq_cassandra 66.22% <40.68%> (-0.33%) ⬇️
plugins-bucket-0 60.91% <40.68%> (-0.25%) ⬇️
plugins-bucket-1 58.14% <40.68%> (-0.23%) ⬇️
plugins-bucket-11 67.67% <84.46%> (+0.65%) ⬆️
plugins-bucket-18 65.43% <41.14%> (-1.02%) ⬇️
plugins-bucket-19 64.92% <40.68%> (-0.32%) ⬇️
plugins-bucket-20 68.64% <99.67%> (+1.58%) ⬆️
plugins-bucket-4 61.07% <40.68%> (-0.30%) ⬇️
plugins-cookie_cookie-parser_crypto 55.66% <40.68%> (-0.25%) ⬇️
plugins-fastify_fetch_fs 65.35% <40.68%> (-0.28%) ⬇️
plugins-generic-pool_google-cloud-pubsub_grpc 68.92% <40.68%> (-0.35%) ⬇️
plugins-handlebars_hapi_hono 63.58% <40.68%> (-0.31%) ⬇️
plugins-ioredis_knex_langgraph 61.59% <40.68%> (-0.29%) ⬇️
plugins-ldapjs_light-my-request_limitd-client 63.30% <40.68%> (-0.31%) ⬇️
plugins-lodash_mariadb_memcached 63.69% <40.68%> (-0.40%) ⬇️
plugins-moleculer_mongodb_mongodb-core 66.03% <40.68%> (-0.33%) ⬇️
plugins-mongoose_multer_mysql 63.88% <40.68%> (-0.30%) ⬇️
plugins-mysql2_nats_node-serialize 66.10% <40.68%> (-0.34%) ⬇️
plugins-opensearch_passport-http_pino 63.99% <40.68%> (-0.32%) ⬇️
plugins-postgres_process_pug 63.03% <40.68%> (-0.33%) ⬇️
plugins-redis_router_sequelize 66.60% <40.68%> (-0.34%) ⬇️
plugins-test-and-upstream-rhea_undici_url 65.95% <40.68%> (-0.32%) ⬇️
plugins-valkey_vm_winston 62.31% <40.68%> (-0.35%) ⬇️
plugins-ws 64.42% <40.68%> (-0.33%) ⬇️
profiling 66.18% <40.68%> (-0.32%) ⬇️
serverless-aws-sdk-aws-sdk 55.41% <40.68%> (-0.17%) ⬇️
serverless-aws-sdk-base-inject-field 55.23% <40.68%> (-0.24%) ⬇️
serverless-aws-sdk-bedrockruntime 58.25% <40.68%> (-0.23%) ⬇️
serverless-aws-sdk-client 60.03% <40.68%> (-0.26%) ⬇️
serverless-aws-sdk-dynamodb 59.11% <40.68%> (-0.24%) ⬇️
serverless-aws-sdk-eventbridge 57.61% <40.68%> (-0.19%) ⬇️
serverless-aws-sdk-kinesis 63.09% <40.68%> (-0.28%) ⬇️
serverless-aws-sdk-lambda 61.05% <40.68%> (-0.26%) ⬇️
serverless-aws-sdk-s3 59.16% <40.68%> (-0.24%) ⬇️
serverless-aws-sdk-serverless-peer-service 63.66% <40.68%> (-0.29%) ⬇️
serverless-aws-sdk-sns 63.98% <40.68%> (-0.29%) ⬇️
serverless-aws-sdk-sqs 64.43% <40.68%> (-0.29%) ⬇️
serverless-aws-sdk-stepfunctions 59.02% <40.68%> (-0.24%) ⬇️
serverless-aws-sdk-util 55.85% <40.68%> (-0.25%) ⬇️
serverless-bucket-0 57.77% <40.68%> (-0.23%) ⬇️
serverless-bucket-1 63.66% <40.68%> (-0.31%) ⬇️
test-optimization-cucumber 70.52% <40.68%> (-0.22%) ⬇️
test-optimization-cypress 64.74% <40.68%> (-0.14%) ⬇️
test-optimization-jest 72.06% <40.68%> (-0.35%) ⬇️
test-optimization-mocha 71.95% <40.68%> (-0.20%) ⬇️
test-optimization-playwright-playwright-atr 59.79% <40.68%> (-0.19%) ⬇️
test-optimization-playwright-playwright-efd 60.41% <40.68%> (-0.25%) ⬇️
test-optimization-playwright-playwright-final-status 60.03% <40.68%> (-0.20%) ⬇️
test-optimization-playwright-playwright-impacted-tests 60.14% <40.68%> (-0.05%) ⬇️
test-optimization-playwright-playwright-reporting 61.11% <40.68%> (-0.21%) ⬇️
test-optimization-playwright-playwright-test-management 61.20% <40.68%> (-0.20%) ⬇️
test-optimization-playwright-playwright-test-span 59.83% <40.68%> (-0.15%) ⬇️
test-optimization-selenium 58.85% <40.68%> (-0.21%) ⬇️
test-optimization-testopt 61.79% <40.68%> (-0.08%) ⬇️
test-optimization-vitest 72.67% <40.68%> (-0.18%) ⬇️
test-optimization-vitest-browser 58.69% <40.68%> (-0.17%) ⬇️
test-optimization-webdriverio 65.48% <40.68%> (-0.17%) ⬇️

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.

@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-07-14-trace-graphql-jit branch 4 times, most recently from 15d9920 to be5b1a7 Compare July 16, 2026 14:47
@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-07-14-trace-graphql-jit branch 2 times, most recently from ac0a85f to adf07fd Compare July 22, 2026 01:30
Comment thread packages/datadog-plugin-graphql/src/jit.js Fixed
Comment thread packages/datadog-plugin-graphql/src/jit.js Fixed
@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-07-14-trace-graphql-jit branch from 19e5af4 to 29ce982 Compare July 22, 2026 21:10
Comment thread packages/datadog-plugin-graphql/src/jit.js Fixed
Comment thread packages/datadog-plugin-graphql/src/jit.js Fixed
Comment thread packages/datadog-plugin-graphql/src/jit.js Fixed
@BridgeAR
BridgeAR marked this pull request as ready for review July 29, 2026 21:27
@BridgeAR
BridgeAR requested a review from a team as a code owner July 29, 2026 21:27
@BridgeAR
BridgeAR requested review from wconti27 and removed request for a team July 29, 2026 21:27

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 269e87cf36

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/datadog-plugin-graphql/src/jit.js Outdated
Comment thread packages/datadog-instrumentations/src/helpers/rewriter/transforms.js Outdated
Comment thread packages/datadog-plugin-graphql/src/request.js Outdated
Comment thread packages/datadog-plugin-graphql/src/execute.js Outdated
@BridgeAR
BridgeAR marked this pull request as draft July 30, 2026 09:21
@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-07-14-trace-graphql-jit branch from 269e87c to f134e53 Compare August 4, 2026 12:15
Comment thread packages/datadog-plugin-graphql/src/jit.js Fixed
@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-07-14-trace-graphql-jit branch 4 times, most recently from e66ad87 to e7afa0e Compare August 6, 2026 00:41
@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-07-14-trace-graphql-jit branch from e7afa0e to 4b9cec2 Compare August 11, 2026 14:36
@BridgeAR
BridgeAR marked this pull request as ready for review August 11, 2026 14:37
The Orchestrion transforms change both the compiler AST and generated query source, so no single code path shows their state handoff.
@BridgeAR
BridgeAR requested a review from a team as a code owner August 27, 2026 13:11

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: df5c217fd5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/datadog-plugin-graphql/src/execute.js
Comment thread packages/datadog-plugin-graphql/src/execute.js

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4a087bd636

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/datadog-plugin-graphql/src/execute.js
The compiler already serializes static arguments before this check, so a second key scan allocates an array for each compiled default field.\n\nUse the exact empty-object source because a custom scalar named `toJSON` can produce another two-character serialization.
Comment thread packages/datadog-plugin-mercurius/test/integration-test/client.spec.js Outdated
Comment thread packages/datadog-plugin-graphql/src/jit.js Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a518b59a64

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/datadog-plugin-graphql/src/tools/transforms.js
Comment thread packages/datadog-plugin-graphql/src/jit.js
Comment thread packages/datadog-plugin-graphql/src/jit.js
Comment thread packages/datadog-plugin-graphql/src/execute.js

@bengl bengl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is all very complex and painful, but I don't see a better way.

@BridgeAR
BridgeAR enabled auto-merge (squash) August 28, 2026 17:49

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d7c2e97b20

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/datadog-instrumentations/src/helpers/graphql-jit-runtime.js Outdated
Collapsed JIT default fields bypass the shared resolver store after the first property read, so traced work from later getter reads is parented to the execute span. graphql-jit can emit the property read multiple times, so preserve its read cardinality while entering the shared field context for every occurrence.
npm includes nested plugin READMEs through the package files globs while Bun excludes them, so the packers otherwise produce different artifacts.
@BridgeAR
BridgeAR requested a review from a team as a code owner August 28, 2026 22:19

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9b56fc1f37

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/datadog-plugin-graphql/src/execute.js
graphql-jit reads one inline default field several times while completing a value. Rewriting each read published duplicate resolver events and created duplicate spans.

Later completion reads stay in the first resolver store. This preserves getter span parenting without starting another resolver.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 20446415b7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/datadog-plugin-graphql/src/execute.js Outdated
Resolver subscribers force every compiled default-field invocation through the runtime. Reused list items then read getters after the collapsed resolver scope has been restored, so child spans attach to the execute span.

On Node 22.23.2 with V8 12.4, a 100-item graphql-jit 0.8.4 query measured 65.541 us before and 26.007 us after. The required scope check changed graphql-jit 0.8.8 from 20.541 us to 22.931 us for the same workload.
@BridgeAR
BridgeAR merged commit eeb206b into master Aug 31, 2026
687 checks passed
@BridgeAR
BridgeAR deleted the BridgeAR/2026-07-14-trace-graphql-jit branch August 31, 2026 16:50
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.

instrument graphql-jit to not lose graphql spans post-JIT

3 participants