Skip to content

fix(span-stats): derive socketPath from the agent URL#9042

Merged
BridgeAR merged 4 commits into
masterfrom
BridgeAR/2026-06-23-span-stats-unix-socket
Jun 24, 2026
Merged

fix(span-stats): derive socketPath from the agent URL#9042
BridgeAR merged 4 commits into
masterfrom
BridgeAR/2026-06-23-span-stats-unix-socket

Conversation

@BridgeAR

Copy link
Copy Markdown
Member

Summary

The span-stats writer hand-copied protocol/hostname/port into the request options and never passed the agent URL, so request() could not reach its unix-socket branch and left protocol: 'unix:' in place. With a Windows named-pipe or UDS agent URL, http.request then threw ERR_INVALID_PROTOCOL and every span-stats payload was dropped. Passing url lets request() map a unix: URL onto options.socketPath, the same way the trace agent exporter already does.

Test plan

  • packages/dd-trace/test/exporters/span-stats/writer.spec.js — new case asserts the writer hands url through and does not pre-set protocol; fails on master, passes with the fix.
  • Existing request.spec.js already covers the unix: URL -> socketPath mapping.

The span-stats writer hand-copied protocol/hostname/port into the request
options and never passed the agent URL, so request() could not reach its
unix-socket branch and left protocol set to 'unix:'. With a named-pipe or
UDS agent URL, http.request then threw ERR_INVALID_PROTOCOL and every span
stats payload was dropped. Passing `url` lets request() map a unix: URL onto
options.socketPath, the same way the trace agent exporter already does.
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 52.94118% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.58%. Comparing base (de59f52) to head (1023740).
⚠️ Report is 12 commits behind head on master.

Files with missing lines Patch % Lines
packages/dd-trace/src/telemetry/send-data.js 0.00% 7 Missing ⚠️
packages/dd-trace/src/exporters/common/url.js 88.88% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (52.94%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #9042       +/-   ##
===========================================
- Coverage   91.83%   50.58%   -41.25%     
===========================================
  Files         879      595      -284     
  Lines       50471    34811    -15660     
  Branches     9934     3745     -6189     
===========================================
- Hits        46350    17610    -28740     
- Misses       4121    17201    +13080     
Flag Coverage Δ
aiguard-integration-active ?
aiguard-integration-latest ?
aiguard-integration-maintenance ?
aiguard-macos 34.60% <47.05%> (-0.04%) ⬇️
aiguard-ubuntu ?
aiguard-windows ?
apm-capabilities-tracing-macos ?
apm-capabilities-tracing-ubuntu-active ?
apm-capabilities-tracing-ubuntu-maintenance ?
apm-capabilities-tracing-windows ?
apm-integrations-aerospike-18-gte.5.2.0 ?
apm-integrations-aerospike-20-gte.5.5.0 ?
apm-integrations-aerospike-22-gte.5.12.1 33.15% <47.05%> (-0.05%) ⬇️
apm-integrations-aerospike-22-gte.6.0.0 33.15% <47.05%> (-0.05%) ⬇️
apm-integrations-aerospike-eol- 33.05% <47.05%> (-0.05%) ⬇️
apm-integrations-child-process ?
apm-integrations-confluentinc-kafka-javascript-18 ?
apm-integrations-confluentinc-kafka-javascript-20 ?
apm-integrations-confluentinc-kafka-javascript-22 ?
apm-integrations-confluentinc-kafka-javascript-24 39.97% <47.05%> (-0.05%) ⬇️
apm-integrations-couchbase-18 ?
apm-integrations-couchbase-eol ?
apm-integrations-dns ?
apm-integrations-elasticsearch ?
apm-integrations-http-maintenance ?
apm-integrations-http-oldest 41.90% <47.05%> (-0.04%) ⬇️
apm-integrations-kafkajs-latest ?
apm-integrations-kafkajs-oldest ?
apm-integrations-net ?
apm-integrations-next-11.1.4 36.61% <ø> (-0.05%) ⬇️
apm-integrations-next-12.3.7 36.61% <ø> (-0.05%) ⬇️
apm-integrations-next-13.0.0 ?
apm-integrations-next-13.2.0 ?
apm-integrations-next-13.5.11 ?
apm-integrations-next-14.0.0 ?
apm-integrations-next-14.2.35 ?
apm-integrations-next-14.2.6 ?
apm-integrations-next-14.2.7 ?
apm-integrations-next-15.0.0 ?
apm-integrations-next-15.4.0 ?
apm-integrations-next-latest ?
apm-integrations-oracledb ?
apm-integrations-prisma-18-gte.6.16.0.and.lt.7.0.0 ?
apm-integrations-prisma-latest-all ?
apm-integrations-restify 35.23% <47.05%> (-0.05%) ⬇️
apm-integrations-sharedb 32.48% <47.05%> (-0.05%) ⬇️
apm-integrations-tedious ?
appsec-express ?
appsec-fastify ?
appsec-graphql ?
appsec-integration-latest ?
appsec-integration-maintenance ?
appsec-integration-oldest ?
appsec-kafka ?
appsec-ldapjs 39.84% <47.05%> (-0.04%) ⬇️
appsec-lodash 39.76% <47.05%> (-0.04%) ⬇️
appsec-macos ?
appsec-mongodb-core ?
appsec-mongoose ?
appsec-mysql ?
appsec-next-latest-11.1.4 27.41% <47.05%> (-0.03%) ⬇️
appsec-next-latest-12.3.7 27.47% <17.64%> (+0.03%) ⬆️
appsec-next-latest-13.0.0 ?
appsec-next-latest-13.2.0 ?
appsec-next-latest-13.5.11 ?
appsec-next-latest-14.0.0 ?
appsec-next-latest-14.2.35 ?
appsec-next-latest-14.2.6 ?
appsec-next-latest-14.2.7 ?
appsec-next-latest-15.0.0 ?
appsec-next-latest-latest ?
appsec-next-oldest-12.3.7 29.26% <47.05%> (-0.04%) ⬇️
appsec-next-oldest-13.0.0 ?
appsec-next-oldest-13.2.0 ?
appsec-next-oldest-13.5.11 ?
appsec-next-oldest-14.0.0 ?
appsec-next-oldest-14.2.35 ?
appsec-next-oldest-14.2.6 ?
appsec-next-oldest-14.2.7 ?
appsec-next-oldest-15.0.0 ?
appsec-next-oldest-latest 27.67% <17.64%> (+0.03%) ⬆️
appsec-node-serialize 39.07% <47.05%> (-0.04%) ⬇️
appsec-passport 42.68% <47.05%> (-0.04%) ⬇️
appsec-sourcing 38.51% <47.05%> (-0.04%) ⬇️
appsec-stripe ?
appsec-template 39.34% <47.05%> (-0.04%) ⬇️
appsec-ubuntu ?
appsec-windows ?
debugger-ubuntu-active ?
debugger-ubuntu-latest ?
debugger-ubuntu-maintenance ?
debugger-ubuntu-oldest ?
instrumentations-instrumentation-ai 45.53% <ø> (ø)
instrumentations-instrumentation-aws-sdk 45.11% <ø> (ø)
instrumentations-instrumentation-bluebird 27.63% <47.05%> (-0.05%) ⬇️
instrumentations-instrumentation-body-parser 35.68% <47.05%> (-0.05%) ⬇️
instrumentations-instrumentation-child_process 33.35% <47.05%> (-0.05%) ⬇️
instrumentations-instrumentation-connect 48.51% <ø> (ø)
instrumentations-instrumentation-cookie-parser 29.54% <47.05%> (-0.05%) ⬇️
instrumentations-instrumentation-couchbase-18 46.23% <ø> (ø)
instrumentations-instrumentation-couchbase-eol ?
instrumentations-instrumentation-crypto 27.60% <47.05%> (-0.05%) ⬇️
instrumentations-instrumentation-express ?
instrumentations-instrumentation-express-mongo-sanitize 29.65% <47.05%> (-0.05%) ⬇️
instrumentations-instrumentation-express-multi-version 41.80% <ø> (ø)
instrumentations-instrumentation-express-session 35.50% <47.05%> (-0.05%) ⬇️
instrumentations-instrumentation-fastify 48.47% <ø> (ø)
instrumentations-instrumentation-fetch 45.21% <ø> (ø)
instrumentations-instrumentation-fs 27.32% <47.05%> (-0.05%) ⬇️
instrumentations-instrumentation-generic-pool 27.49% <17.64%> (+0.02%) ⬆️
instrumentations-instrumentation-hono 28.85% <47.05%> (-0.05%) ⬇️
instrumentations-instrumentation-http 37.94% <47.05%> (?)
instrumentations-instrumentation-http-client-options 37.54% <47.05%> (-0.05%) ⬇️
instrumentations-instrumentation-kafkajs 49.19% <ø> (ø)
instrumentations-instrumentation-knex ?
instrumentations-instrumentation-koa 46.11% <ø> (ø)
instrumentations-instrumentation-light-my-request 35.32% <47.05%> (-0.05%) ⬇️
instrumentations-instrumentation-mongoose ?
instrumentations-instrumentation-multer 35.35% <47.05%> (-0.05%) ⬇️
instrumentations-instrumentation-mysql2 33.47% <47.05%> (-0.05%) ⬇️
instrumentations-instrumentation-openai-lifecycle 46.21% <ø> (ø)
instrumentations-instrumentation-otel-sdk-trace 25.48% <17.64%> (+0.02%) ⬆️
instrumentations-instrumentation-passport 39.23% <47.05%> (-0.04%) ⬇️
instrumentations-instrumentation-passport-http 38.93% <47.05%> (-0.04%) ⬇️
instrumentations-instrumentation-passport-local 39.38% <47.05%> (-0.04%) ⬇️
instrumentations-instrumentation-pg 33.20% <47.05%> (-0.05%) ⬇️
instrumentations-instrumentation-promise 27.58% <47.05%> (-0.05%) ⬇️
instrumentations-instrumentation-promise-js 27.58% <47.05%> (-0.05%) ⬇️
instrumentations-instrumentation-q 27.61% <47.05%> (-0.05%) ⬇️
instrumentations-instrumentation-restify 47.75% <ø> (ø)
instrumentations-instrumentation-router 43.64% <ø> (ø)
instrumentations-instrumentation-stripe 28.13% <47.05%> (-0.05%) ⬇️
instrumentations-instrumentation-url 27.43% <47.05%> (-0.05%) ⬇️
instrumentations-instrumentation-when 27.60% <47.05%> (-0.05%) ⬇️
instrumentations-instrumentation-zlib 27.48% <47.05%> (-0.05%) ⬇️
instrumentations-integration-esbuild-0.16.12-active ?
instrumentations-integration-esbuild-latest-active ?
instrumentations-integration-esbuild-latest-latest ?
instrumentations-integration-esbuild-latest-maintenance ?
instrumentations-integration-esbuild-latest-oldest ?
llmobs-ai ?
llmobs-anthropic ?
llmobs-google-genai ?
llmobs-langchain ?
llmobs-openai-latest ?
llmobs-openai-oldest ?
llmobs-sdk-active ?
llmobs-sdk-latest ?
llmobs-sdk-maintenance ?
llmobs-sdk-oldest ?
llmobs-vertex-ai ?
master-coverage 50.58% <52.94%> (?)
openfeature-macos 37.51% <47.05%> (+0.02%) ⬆️
openfeature-ubuntu ?
openfeature-unit-active 49.93% <17.64%> (+0.06%) ⬆️
openfeature-unit-latest 49.93% <17.64%> (+0.06%) ⬆️
openfeature-unit-maintenance 50.30% <17.64%> (+0.06%) ⬆️
openfeature-unit-oldest 50.30% <17.64%> (+0.06%) ⬆️
openfeature-windows ?
platform-core 46.47% <ø> (ø)
platform-esbuild 47.49% <ø> (ø)
platform-instrumentations-misc ?
platform-integration-active ?
platform-integration-latest ?
platform-integration-maintenance ?
platform-integration-oldest ?
platform-shimmer 47.50% <ø> (ø)
platform-unit-guardrails 44.42% <ø> (ø)
platform-webpack 18.28% <17.64%> (+<0.01%) ⬆️
plugins-aws-durable-execution-sdk-js ?
plugins-axios ?
plugins-azure-cosmos ?
plugins-azure-event-hubs ?
plugins-azure-service-bus ?
plugins-bullmq ?
plugins-cassandra ?
plugins-cookie 40.72% <ø> (ø)
plugins-cookie-parser 40.55% <ø> (ø)
plugins-crypto 42.71% <ø> (ø)
plugins-dd-trace-api 33.20% <52.94%> (-0.06%) ⬇️
plugins-express-mongo-sanitize 40.60% <ø> (ø)
plugins-express-session 40.46% <ø> (ø)
plugins-fastify ?
plugins-fetch 34.54% <47.05%> (-0.05%) ⬇️
plugins-fs ?
plugins-generic-pool 40.02% <ø> (ø)
plugins-google-cloud-pubsub ?
plugins-grpc ?
plugins-handlebars 40.60% <ø> (ø)
plugins-hapi 35.58% <47.05%> (-0.20%) ⬇️
plugins-hono 35.91% <47.05%> (-0.05%) ⬇️
plugins-ioredis ?
plugins-jest ?
plugins-knex ?
plugins-langgraph 32.33% <47.05%> (-0.05%) ⬇️
plugins-ldapjs 39.02% <ø> (ø)
plugins-light-my-request 40.16% <ø> (ø)
plugins-limitd-client ?
plugins-lodash 40.21% <ø> (ø)
plugins-mariadb ?
plugins-memcached ?
plugins-microgateway-core 34.83% <47.05%> (+0.05%) ⬆️
plugins-modelcontextprotocol-sdk 32.29% <47.05%> (-0.05%) ⬇️
plugins-moleculer ?
plugins-mongodb-core ?
plugins-mongoose ?
plugins-multer 40.52% <ø> (ø)
plugins-mysql ?
plugins-mysql2 ?
plugins-nats 36.27% <47.05%> (?)
plugins-node-serialize 40.75% <ø> (ø)
plugins-opensearch ?
plugins-passport-http 40.33% <ø> (ø)
plugins-pino ?
plugins-process 42.71% <ø> (ø)
plugins-pug 40.72% <ø> (ø)
plugins-redis ?
plugins-router 38.16% <47.05%> (-0.05%) ⬇️
plugins-sequelize ?
plugins-test-and-upstream-amqp10 ?
plugins-test-and-upstream-apollo ?
plugins-test-and-upstream-avsc 33.69% <47.05%> (?)
plugins-test-and-upstream-connect ?
plugins-test-and-upstream-graphql ?
plugins-test-and-upstream-koa ?
plugins-test-and-upstream-protobufjs 33.92% <47.05%> (-0.04%) ⬇️
plugins-test-and-upstream-rhea ?
plugins-undici 34.97% <47.05%> (-0.04%) ⬇️
plugins-url 42.71% <ø> (ø)
plugins-valkey 33.76% <47.05%> (-0.05%) ⬇️
plugins-vm 42.71% <ø> (ø)
plugins-winston 29.73% <47.05%> (-0.05%) ⬇️
plugins-ws 37.03% <47.05%> (-0.05%) ⬇️
profiling-macos ?
profiling-ubuntu ?
profiling-windows ?
serverless-aws-sdk-latest-aws-sdk ?
serverless-aws-sdk-latest-bedrockruntime ?
serverless-aws-sdk-latest-client ?
serverless-aws-sdk-latest-dynamodb ?
serverless-aws-sdk-latest-eventbridge ?
serverless-aws-sdk-latest-kinesis ?
serverless-aws-sdk-latest-lambda ?
serverless-aws-sdk-latest-s3 ?
serverless-aws-sdk-latest-serverless-peer-service ?
serverless-aws-sdk-latest-sns ?
serverless-aws-sdk-latest-sqs ?
serverless-aws-sdk-latest-stepfunctions ?
serverless-aws-sdk-latest-util ?
serverless-aws-sdk-oldest-aws-sdk ?
serverless-aws-sdk-oldest-bedrockruntime ?
serverless-aws-sdk-oldest-client ?
serverless-aws-sdk-oldest-dynamodb ?
serverless-aws-sdk-oldest-lambda ?
serverless-aws-sdk-oldest-s3 ?
serverless-aws-sdk-oldest-serverless-peer-service ?
serverless-aws-sdk-oldest-sns ?
serverless-aws-sdk-oldest-sqs ?
serverless-aws-sdk-oldest-stepfunctions ?
serverless-aws-sdk-oldest-util ?
serverless-azure-durable-functions ?
serverless-azure-functions-eventhubs ?
serverless-azure-functions-servicebus ?
serverless-lambda 34.33% <47.05%> (-0.06%) ⬇️
test-optimization-cucumber-latest-7.0.0 ?
test-optimization-cucumber-latest-latest ?
test-optimization-cucumber-oldest-7.0.0 ?
test-optimization-cypress-latest-12.0.0-commonJS ?
test-optimization-cypress-latest-12.0.0-esm ?
test-optimization-cypress-latest-14.5.4-commonJS ?
test-optimization-cypress-latest-14.5.4-esm ?
test-optimization-cypress-latest-latest-commonJS ?
test-optimization-cypress-latest-latest-esm ?
test-optimization-cypress-oldest-12.0.0-commonJS ?
test-optimization-cypress-oldest-12.0.0-esm ?
test-optimization-cypress-oldest-14.5.4-commonJS ?
test-optimization-cypress-oldest-14.5.4-esm ?
test-optimization-jest-latest-latest ?
test-optimization-jest-latest-oldest ?
test-optimization-jest-oldest-latest ?
test-optimization-jest-oldest-oldest ?
test-optimization-mocha-latest-latest ?
test-optimization-mocha-latest-oldest ?
test-optimization-mocha-oldest-latest ?
test-optimization-mocha-oldest-oldest ?
test-optimization-playwright-latest-latest-playwright-active-test-span ?
test-optimization-playwright-latest-latest-playwright-atr ?
test-optimization-playwright-latest-latest-playwright-efd ?
test-optimization-playwright-latest-latest-playwright-final-status ?
test-optimization-playwright-latest-latest-playwright-impacted-tests ?
test-optimization-playwright-latest-latest-playwright-reporting ?
test-optimization-playwright-latest-latest-playwright-test-management ?
test-optimization-playwright-latest-oldest-playwright-active-test-span ?
test-optimization-playwright-latest-oldest-playwright-atr ?
test-optimization-playwright-latest-oldest-playwright-efd ?
test-optimization-playwright-latest-oldest-playwright-final-status ?
test-optimization-playwright-latest-oldest-playwright-impacted-tests ?
test-optimization-playwright-latest-oldest-playwright-reporting ?
test-optimization-playwright-latest-oldest-playwright-test-management ?
test-optimization-playwright-oldest-latest-playwright-active-test-span ?
test-optimization-playwright-oldest-latest-playwright-atr ?
test-optimization-playwright-oldest-latest-playwright-efd ?
test-optimization-playwright-oldest-latest-playwright-final-status ?
test-optimization-playwright-oldest-latest-playwright-impacted-tests ?
test-optimization-playwright-oldest-latest-playwright-reporting ?
test-optimization-playwright-oldest-latest-playwright-test-management ?
test-optimization-playwright-oldest-oldest-playwright-active-test-span ?
test-optimization-playwright-oldest-oldest-playwright-atr ?
test-optimization-playwright-oldest-oldest-playwright-efd ?
test-optimization-playwright-oldest-oldest-playwright-final-status ?
test-optimization-playwright-oldest-oldest-playwright-impacted-tests ?
test-optimization-playwright-oldest-oldest-playwright-reporting ?
test-optimization-playwright-oldest-oldest-playwright-test-management ?
test-optimization-selenium-latest ?
test-optimization-selenium-oldest ?
test-optimization-testopt-active ?
test-optimization-testopt-latest ?
test-optimization-testopt-maintenance ?
test-optimization-testopt-oldest ?
test-optimization-vitest-latest ?
test-optimization-vitest-oldest ?

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.

@dd-octo-sts

dd-octo-sts Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 6.32 MB
Deduped: 7.38 MB
No deduping: 7.38 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-prod-us1-6

datadog-prod-us1-6 Bot commented Jun 23, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

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

@BridgeAR BridgeAR marked this pull request as ready for review June 23, 2026 19:13
@BridgeAR BridgeAR requested a review from a team as a code owner June 23, 2026 19:13

@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: d5c2720784

ℹ️ 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/dd-trace/src/exporters/span-stats/writer.js
@pr-commenter

pr-commenter Bot commented Jun 23, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-06-24 19:06:06

Comparing candidate commit 1023740 in PR branch BridgeAR/2026-06-23-span-stats-unix-socket with baseline commit de59f52 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 1953 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 ----------------------------------'

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-24

  • unstable execution_time [-120.084ms; +168.593ms] or [-4.617%; +6.482%]

scenario:appsec-appsec-enabled-26

  • unstable execution_time [-172.072ms; +175.407ms] or [-6.912%; +7.046%]

scenario:appsec-control-20

  • unstable execution_time [-139.731ms; +125.362ms] or [-8.152%; +7.314%]

scenario:appsec-control-24

  • unstable execution_time [-94938.680µs; +94873.013µs] or [-7.902%; +7.897%]

scenario:appsec-control-26

  • unstable execution_time [-101010.012µs; +99225.579µs] or [-8.497%; +8.346%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-389.645ms; +392.402ms] or [-7.986%; +8.043%]
  • unstable execution_time [-393358.743µs; +391504.493µs] or [-7.944%; +7.906%]

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

  • unstable cpu_user_time [-226.720ms; +377.243ms] or [-4.942%; +8.224%]
  • unstable execution_time [-237.715ms; +403.729ms] or [-4.875%; +8.279%]
  • unstable max_rss_usage [-23.059MB; +44.860MB] or [-4.188%; +8.148%]

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

  • unstable max_rss_usage [-10349.198KB; +9581.769KB] or [-7.594%; +7.031%]

scenario:test-optimization-large-suite-20

  • unstable max_rss_usage [-4.357MB; +9.043MB] or [-5.361%; +11.127%]

The CI-visibility and profiling exporters built request options from
`url.pathname` directly, so a Windows named-pipe agent URL
(`unix://./pipe/...`) lost its `//.` authority and the request hit the wrong
socket path. parseUrl now lives in exporters/common/url.js and folds that
authority back into the path, so all three request paths derive the socket
path the same way and can no longer drift.

Drive-by fix:

* The common request spec restores its sinon sandbox instead of resetting it,
  so the `http.request` spy no longer leaks into sibling suites.
@BridgeAR BridgeAR requested review from a team as code owners June 23, 2026 22:27
@BridgeAR BridgeAR requested review from khanayan123 and removed request for a team June 23, 2026 22:27
Comment thread packages/dd-trace/src/telemetry/send-data.js
The agent-telemetry fallback passed the agentless intake endpoint to `request`
as a string while the primary agentless path already constructed a `URL`. Build
it with `new URL` up front and guard it the same way, so an invalid endpoint is
logged and the request skipped rather than throwing from inside the request
helper.
@BridgeAR BridgeAR force-pushed the BridgeAR/2026-06-23-span-stats-unix-socket branch from 48ae52e to 9281ba3 Compare June 23, 2026 22:46
The new url.js added here landed in src/exporters/common/, which had no
code owner except the single retry.js rule, leaving it and eight sibling
files unowned. Broadening the rule to the directory gives every current
and future file there an owner.
@BridgeAR BridgeAR merged commit 0fe045f into master Jun 24, 2026
804 of 805 checks passed
@BridgeAR BridgeAR deleted the BridgeAR/2026-06-23-span-stats-unix-socket branch June 24, 2026 19:49
dd-octo-sts Bot pushed a commit that referenced this pull request Jun 25, 2026
* fix(span-stats): derive socketPath from the agent URL

The span-stats writer hand-copied protocol/hostname/port into the request
options and never passed the agent URL, so request() could not reach its
unix-socket branch and left protocol set to 'unix:'. With a named-pipe or
UDS agent URL, http.request then threw ERR_INVALID_PROTOCOL and every span
stats payload was dropped. Passing `url` lets request() map a unix: URL onto
options.socketPath, the same way the trace agent exporter already does.

* fix(exporters): recompose named-pipe socket paths in one shared helper

The CI-visibility and profiling exporters built request options from
`url.pathname` directly, so a Windows named-pipe agent URL
(`unix://./pipe/...`) lost its `//.` authority and the request hit the wrong
socket path. parseUrl now lives in exporters/common/url.js and folds that
authority back into the path, so all three request paths derive the socket
path the same way and can no longer drift.

Drive-by fix:

* The common request spec restores its sinon sandbox instead of resetting it,
  so the `http.request` spy no longer leaks into sibling suites.

* refactor(telemetry): send the agentless backend URL as a URL object

The agent-telemetry fallback passed the agentless intake endpoint to `request`
as a string while the primary agentless path already constructed a `URL`. Build
it with `new URL` up front and guard it the same way, so an invalid endpoint is
logged and the request skipped rather than throwing from inside the request
helper.
This was referenced Jun 25, 2026
pabloerhard pushed a commit that referenced this pull request Jun 26, 2026
* fix(span-stats): derive socketPath from the agent URL

The span-stats writer hand-copied protocol/hostname/port into the request
options and never passed the agent URL, so request() could not reach its
unix-socket branch and left protocol set to 'unix:'. With a named-pipe or
UDS agent URL, http.request then threw ERR_INVALID_PROTOCOL and every span
stats payload was dropped. Passing `url` lets request() map a unix: URL onto
options.socketPath, the same way the trace agent exporter already does.

* fix(exporters): recompose named-pipe socket paths in one shared helper

The CI-visibility and profiling exporters built request options from
`url.pathname` directly, so a Windows named-pipe agent URL
(`unix://./pipe/...`) lost its `//.` authority and the request hit the wrong
socket path. parseUrl now lives in exporters/common/url.js and folds that
authority back into the path, so all three request paths derive the socket
path the same way and can no longer drift.

Drive-by fix:

* The common request spec restores its sinon sandbox instead of resetting it,
  so the `http.request` spy no longer leaks into sibling suites.

* refactor(telemetry): send the agentless backend URL as a URL object

The agent-telemetry fallback passed the agentless intake endpoint to `request`
as a string while the primary agentless path already constructed a `URL`. Build
it with `new URL` up front and guard it the same way, so an invalid endpoint is
logged and the request skipped rather than throwing from inside the request
helper.
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