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

[SDTEST-228] Auto instrumentation #259

Merged
merged 15 commits into from
Nov 25, 2024
Merged

Conversation

anmarchenko
Copy link
Member

@anmarchenko anmarchenko commented Nov 25, 2024

What does this PR do?
Allows Ruby test runs to be autoinstrumented without code changes (via RUBYOPT env variable or datadog-ci CLI).

Example using RUBYOPT:
RUBYOPT="-rbundler/setup -rdatadog/ci/auto_instrument" bundle exec rake test

Example using ddcirb CLI tool:
bundle exec ddcirb exec bundle exec rake test

Motivation
Easier onboarding

How to test the change?
There are integration tests provided, also tested using a number of open source projects' forks

@codecov-commenter
Copy link

codecov-commenter commented Nov 25, 2024

Codecov Report

Attention: Patch coverage is 78.94737% with 28 lines in your changes missing coverage. Please review.

Project coverage is 98.52%. Comparing base (9c8d52b) to head (bdb6589).

Files with missing lines Patch % Lines
lib/datadog/ci/contrib/instrumentation.rb 60.78% 20 Missing ⚠️
lib/datadog/ci/cli/command/exec.rb 64.28% 5 Missing ⚠️
lib/datadog/ci/cli/cli.rb 75.00% 1 Missing ⚠️
lib/datadog/ci/contrib/integration.rb 75.00% 1 Missing ⚠️
lib/datadog/ci/test_retries/strategy/retry_new.rb 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #259      +/-   ##
==========================================
- Coverage   98.77%   98.52%   -0.26%     
==========================================
  Files         293      298       +5     
  Lines       13957    14079     +122     
  Branches      669      680      +11     
==========================================
+ Hits        13786    13871      +85     
- Misses        171      208      +37     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@anmarchenko anmarchenko marked this pull request as ready for review November 25, 2024 13:03
@anmarchenko anmarchenko requested review from a team as code owners November 25, 2024 13:03
@anmarchenko anmarchenko changed the title [SDTEST-228] Auto instrumentation for Ruby [SDTEST-228] Auto instrumentation Nov 25, 2024
@anmarchenko anmarchenko merged commit 7e3bb16 into main Nov 25, 2024
31 checks passed
@anmarchenko anmarchenko deleted the anmarchenko/auto_instrumentation branch November 25, 2024 14:32
@github-actions github-actions bot added this to the 1.9.0 milestone Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants