Skip to content

Support curl_multi_exec root spans#3419

Merged
bwoebi merged 3 commits into
masterfrom
bob/root-multi-curl
Sep 29, 2025
Merged

Support curl_multi_exec root spans#3419
bwoebi merged 3 commits into
masterfrom
bob/root-multi-curl

Conversation

@bwoebi

@bwoebi bwoebi commented Sep 18, 2025

Copy link
Copy Markdown
Collaborator

Instead of updating the duration of the first invocation, close the span upon the final invocation.

@bwoebi
bwoebi requested review from a team as code owners September 18, 2025 20:00
@codecov-commenter

codecov-commenter commented Sep 18, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.77%. Comparing base (4c233be) to head (d4edc09).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3419      +/-   ##
==========================================
- Coverage   61.87%   61.77%   -0.10%     
==========================================
  Files         141      141              
  Lines       12481    12481              
  Branches     1630     1630              
==========================================
- Hits         7722     7710      -12     
- Misses       4038     4051      +13     
+ Partials      721      720       -1     

see 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c233be...d4edc09. Read the comment docs.

🚀 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.

@pr-commenter

pr-commenter Bot commented Sep 18, 2025

Copy link
Copy Markdown

Benchmarks [ tracer ]

Benchmark execution time: 2025-09-22 15:23:23

Comparing candidate commit d4edc09 in PR branch bob/root-multi-curl with baseline commit 4c233be in branch master.

Found 5 performance improvements and 7 performance regressions! Performance is the same for 181 metrics, 1 unstable metrics.

scenario:BM_TeaSapiSpindown

  • 🟥 execution_time [+11.070µs; +32.008µs] or [+2.095%; +6.058%]

scenario:ComposerTelemetryBench/benchTelemetryParsing-opcache

  • 🟥 execution_time [+0.862µs; +1.738µs] or [+7.006%; +14.132%]

scenario:EmptyFileBench/benchEmptyFileDdprof-opcache

  • 🟩 execution_time [-352.025µs; -131.975µs] or [-8.946%; -3.354%]

scenario:MessagePackSerializationBench/benchMessagePackSerialization

  • 🟩 execution_time [-7.623µs; -6.797µs] or [-7.181%; -6.404%]

scenario:MessagePackSerializationBench/benchMessagePackSerialization-opcache

  • 🟩 execution_time [-10.955µs; -9.025µs] or [-9.668%; -7.965%]

scenario:SamplingRuleMatchingBench/benchRegexMatching1

  • 🟥 execution_time [+55.171ns; +129.029ns] or [+4.695%; +10.981%]

scenario:SamplingRuleMatchingBench/benchRegexMatching2

  • 🟥 execution_time [+99.388ns; +149.612ns] or [+8.594%; +12.937%]

scenario:SamplingRuleMatchingBench/benchRegexMatching3

  • 🟥 execution_time [+84.875ns; +160.125ns] or [+7.267%; +13.711%]

scenario:SamplingRuleMatchingBench/benchRegexMatching4

  • 🟥 execution_time [+81.820ns; +123.980ns] or [+7.068%; +10.710%]

scenario:SymfonyBench/benchSymfonyDdprof-opcache

  • 🟩 execution_time [-312.678µs; -202.922µs] or [-3.620%; -2.349%]

scenario:TraceAnnotationsBench/benchTraceAnnotationOverhead-opcache

  • 🟥 execution_time [+5.154µs; +10.961µs] or [+2.995%; +6.370%]

scenario:TraceSerializationBench/benchSerializeTrace

  • 🟩 execution_time [-35.229µs; -21.671µs] or [-7.945%; -4.887%]

@bwoebi
bwoebi force-pushed the bob/root-multi-curl branch from 9555c72 to f8988cb Compare September 19, 2025 12:42
Instead of updating the duration of the first invocation, close the span upon the final invocation.
@bwoebi
bwoebi force-pushed the bob/root-multi-curl branch from f8988cb to 3d74ec2 Compare September 19, 2025 14:16
@bwoebi
bwoebi force-pushed the bob/root-multi-curl branch from 3d74ec2 to d4edc09 Compare September 22, 2025 14:17
Comment thread tests/Integrations/Guzzle/V5/GuzzleIntegrationTest.php Outdated
$span->meta[Tag::COMPONENT] = self::NAME;
$span->peerServiceSources = HttpClientIntegrationHelper::PEER_SERVICE_SOURCES;

\DDTrace\collect_code_origins(1);

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.

Code origins weren't enabled for this span before, right? Should we call this out in the title/description?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

They were. Code origins are enabled for spans started via $hook->span(), but not start_span(), so we need to do it manually.

@bwoebi
bwoebi merged commit 622076e into master Sep 29, 2025
18 of 19 checks passed
@bwoebi
bwoebi deleted the bob/root-multi-curl branch September 29, 2025 18:30
@github-actions github-actions Bot added profiling Relates to the Continuous Profiler tracing area:asm labels Sep 29, 2025
@github-actions github-actions Bot added this to the 1.13.0 milestone Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:asm profiling Relates to the Continuous Profiler tracing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants