Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEBUG-3568 DRY transport options, remove HTTP.new method #4469

Merged
merged 14 commits into from
Mar 19, 2025

Conversation

p-datadog
Copy link
Member

@p-datadog p-datadog commented Mar 6, 2025

What does this PR do?

Reduces duplication of existing transport code by removing the HTTP.new method which was identical for all transports and removing the code that copied agent settings into transport options.

Transport options are now explicitly enumerated (they are api_version and headers) instead of being a hash. This will make code that passed invalid or unknown options fail instead of silently doing nothing.

Motivation:
Preparation for chunking of dynamic instrumentation event submissions

Change log entry
None

Additional Notes:
This PR should not contain any API changes. The options style arguments have been replaced with explicit keyword arguments in some methods but the set of arguments accepted remains the same as before.

How to test the change?
Existing unit tests

@p-datadog p-datadog requested review from a team as code owners March 6, 2025 19:39
@github-actions github-actions bot added core Involves Datadog core libraries tracing labels Mar 6, 2025
@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Mar 6, 2025

Datadog Report

Branch report: transport-options
Commit report: f0ab44b
Test service: dd-trace-rb

✅ 0 Failed, 20523 Passed, 1372 Skipped, 3m 23.28s Total Time

@pr-commenter
Copy link

pr-commenter bot commented Mar 6, 2025

Benchmarks

Benchmark execution time: 2025-03-19 15:13:10

Comparing candidate commit f0ab44b in PR branch transport-options with baseline commit b27ad8d in branch master.

Found 3 performance improvements and 0 performance regressions! Performance is the same for 28 metrics, 2 unstable metrics.

scenario:line instrumentation - targeted

  • 🟩 throughput [+14324.598op/s; +14856.545op/s] or [+9.265%; +9.609%]

scenario:line instrumentation - untargeted

  • 🟩 throughput [+4716.251op/s; +4974.279op/s] or [+5.218%; +5.503%]

scenario:method instrumentation

  • 🟩 throughput [+10282.473op/s; +10745.927op/s] or [+6.125%; +6.402%]

@codecov-commenter
Copy link

codecov-commenter commented Mar 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.73%. Comparing base (b27ad8d) to head (f0ab44b).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4469   +/-   ##
=======================================
  Coverage   97.72%   97.73%           
=======================================
  Files        1385     1386    +1     
  Lines       84228    84159   -69     
  Branches     4281     4256   -25     
=======================================
- Hits        82315    82255   -60     
+ Misses       1913     1904    -9     

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

@p-datadog p-datadog changed the title DEBUG-3568 DRY transport code more DEBUG-3568 DRY transport options, remove HTTP.new method Mar 11, 2025
@p-datadog p-datadog merged commit bce6c64 into master Mar 19, 2025
462 checks passed
@p-datadog p-datadog deleted the transport-options branch March 19, 2025 15:30
@github-actions github-actions bot added this to the 2.13.0 milestone Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Involves Datadog core libraries tracing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants