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

Gracefully handle Rails runner patching whenever spans aren't instrumented #3996

Merged

Conversation

tylerwillingham
Copy link
Contributor

@tylerwillingham tylerwillingham commented Oct 11, 2024

What does this PR do?

Motivation:

This avoids an undefined method error on nilClass whenever when attempting span.name=. The spec correctly captures the scenario we're seeing during deploys in our Rails app.

Additional Notes:

How to test the change?

Unsure? Have a question? Request a review!

@tylerwillingham tylerwillingham force-pushed the twilling/rails-runner-spanless-bug branch 2 times, most recently from b4a743c to f2031a0 Compare October 11, 2024 19:16
@tylerwillingham tylerwillingham marked this pull request as ready for review October 11, 2024 19:23
@tylerwillingham tylerwillingham requested a review from a team as a code owner October 11, 2024 19:23
@codecov-commenter
Copy link

codecov-commenter commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.86%. Comparing base (cdfc685) to head (9e6885e).
Report is 9 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3996   +/-   ##
=======================================
  Coverage   97.86%   97.86%           
=======================================
  Files        1314     1314           
  Lines       78651    78654    +3     
  Branches     3909     3909           
=======================================
+ Hits        76970    76975    +5     
+ Misses       1681     1679    -2     

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

@tylerwillingham tylerwillingham force-pushed the twilling/rails-runner-spanless-bug branch from f2031a0 to 1430cbc Compare October 11, 2024 19:34
@tylerwillingham
Copy link
Contributor Author

@marcotc any thoughts on this? Asking since you worked on #1219 / #2509

@marcotc
Copy link
Member

marcotc commented Oct 15, 2024

Thank you so much, @tylerwillingham! The changes are clean and correct 👍

@tylerwillingham
Copy link
Contributor Author

@marcotc happy to contribute 👍

@marcotc marcotc merged commit f69777a into DataDog:master Oct 15, 2024
246 of 247 checks passed
@marcotc marcotc added this to the 2.5.0 milestone Oct 15, 2024
@Strech Strech mentioned this pull request Nov 5, 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.

Rails runner not working after new instrumentation additions in datadog 2.2
3 participants