Skip to content

Added: Rails 8.0 support #4455

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

Merged
merged 60 commits into from
May 22, 2025
Merged

Added: Rails 8.0 support #4455

merged 60 commits into from
May 22, 2025

Conversation

marcotc
Copy link
Member

@marcotc marcotc commented Mar 5, 2025

What does this PR do?
Adds support for all existing instrumentation for Rails 8.0.x.
The only production change is in how ActiveSupport cache keys are reported in a span (there's some special handling added for Rails 8), but other parts stay identical.

The tricky part was getting CI to run: Rails 8 really doesn't like to be restarted in-memory, like we do for all other versions of Rails. I had to resort to forking on each test run, something that is not actually supported by RSpec, so I added support for it in spec/support/execute_in_fork.rb.

Change log entry
Yes. Add support for Rails 8.0.

Additional Notes:
It was soooo hard to get the tests to run, without making a complete and utter mess in the process.

How to test the change?
All changes have automated tests.

Copy link

github-actions bot commented Mar 5, 2025

Thank you for updating Change log entry section 👏

Visited at: 2025-03-25 18:39:46 UTC

@github-actions github-actions bot added integrations Involves tracing integrations tracing labels Mar 5, 2025
@pr-commenter
Copy link

pr-commenter bot commented Mar 5, 2025

Benchmarks

Benchmark execution time: 2025-05-22 16:05:21

Comparing candidate commit 5e75c0c in PR branch rails-8 with baseline commit 1a8ded2 in branch master.

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

scenario:profiling - Allocations ()

  • 🟩 throughput [+189853.318op/s; +195509.180op/s] or [+6.027%; +6.206%]

@datadog-datadog-prod-us1
Copy link
Contributor

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

Datadog Report

Branch report: rails-8
Commit report: 5e75c0c
Test service: dd-trace-rb

✅ 0 Failed, 21686 Passed, 1299 Skipped, 4m 11.87s Total Time

@codecov-commenter
Copy link

codecov-commenter commented Mar 26, 2025

Codecov Report

Attention: Patch coverage is 72.19251% with 104 lines in your changes missing coverage. Please review.

Project coverage is 97.62%. Comparing base (1a8ded2) to head (5e75c0c).

Files with missing lines Patch % Lines
...ec/datadog/tracing/contrib/rails/support/rails8.rb 10.81% 66 Missing ⚠️
spec/support/execute_in_fork.rb 61.53% 25 Missing ⚠️
...ng/contrib/active_support/cache/instrumentation.rb 27.27% 8 Missing ⚠️
...action_pack/action_dispatch/journey/router_spec.rb 97.69% 3 Missing ⚠️
...og/tracing/contrib/active_support/cache/patcher.rb 50.00% 1 Missing ⚠️
.../datadog/tracing/contrib/rails/support/database.rb 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4455      +/-   ##
==========================================
- Coverage   97.74%   97.62%   -0.12%     
==========================================
  Files        1455     1459       +4     
  Lines       87371    87558     +187     
  Branches     4492     4537      +45     
==========================================
+ Hits        85397    85481      +84     
- Misses       1974     2077     +103     

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

@marcotc marcotc marked this pull request as ready for review March 26, 2025 17:15
@marcotc marcotc requested review from a team as code owners March 26, 2025 17:15
@marcotc marcotc requested a review from a team as a code owner May 22, 2025 15:28
@marcotc marcotc merged commit aa12845 into master May 22, 2025
453 checks passed
@marcotc marcotc deleted the rails-8 branch May 22, 2025 16:14
@github-actions github-actions bot added this to the 2.17.0 milestone May 22, 2025
@p-datadog p-datadog mentioned this pull request Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrations Involves tracing integrations tracing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants