Skip to content

Conversation

@p-datadog
Copy link
Member

What does this PR do?

Adds defined(@foo) guards when accessing instance variables that are initialized lazily

Motivation:
Remove ruby -w warnings I am seeing in local test runs

Change log entry
None

Additional Notes:

How to test the change?

Existing CI

@p-datadog p-datadog requested review from a team as code owners December 20, 2025 14:34
@p-datadog p-datadog requested a review from mabdinur December 20, 2025 14:34
@github-actions github-actions bot added integrations Involves tracing integrations tracing labels Dec 20, 2025
@datadog-datadog-prod-us1

This comment has been minimized.

@pr-commenter
Copy link

pr-commenter bot commented Dec 22, 2025

Benchmarks

Benchmark execution time: 2025-12-24 18:54:53

Comparing candidate commit 10a906c in PR branch fix-ruby-warnings with baseline commit fe74974 in branch master.

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

@marcotc
Copy link
Member

marcotc commented Dec 22, 2025

I feel like we need a Cop for this.

@vpellan
Copy link
Contributor

vpellan commented Dec 23, 2025

I feel like we need a Cop for this.

Steep should be able to catch that but this file is ignored.

@p-datadog p-datadog merged commit 155334b into master Dec 29, 2025
780 of 783 checks passed
@p-datadog p-datadog deleted the fix-ruby-warnings branch December 29, 2025 21:22
@github-actions github-actions bot added this to the 2.24.0 milestone Dec 29, 2025
p-datadog pushed a commit that referenced this pull request Jan 5, 2026
* master: (129 commits)
  Transports: remove api_version (#5164)
  DEBUG-4548 Telemetry: send events in forked children + telemetry metrics reset after fork (#5159)
  Ignore "leaked" pipe file descriptors in JRuby, improve diagnostics  (#5188)
  debug-4548 Increase number of iterations for flakiness (#5184)
  [🤖] Update System Tests: https://github.com/DataDog/dd-trace-rb/actions/runs/20684824141
  [🤖] Update System Tests: https://github.com/DataDog/dd-trace-rb/actions/runs/20616292456 (#5190)
  downgrade ffi for ruby 4.0 & 2.5 (#5189)
  Fix ruby warnings when accessing undefined instance variables (#5178)
  DEBUG-3499 DI: fix accounting when intrumenting upon class definition, add instr… (#5168)
  DEBUG-3499 RC: add diagnostics for invalid values (#5167)
  DEBUG-4548 Core: fix worker shutdown race  (#5176)
  Retry system-test build (#5181)
  Fix Baggage type check (#5182)
  [🤖] Update System Tests: https://github.com/DataDog/dd-trace-rb/actions/runs/20487829791 (#5183)
  [🤖] Update Latest Dependency: https://github.com/DataDog/dd-trace-rb/actions/runs/20401889084 (#5180)
  DEBUG-3499 DI: do not instrument when there is already an installed probe with the same id (#5169)
  DEBUG-3499 DI: rework RC interface (#5165)
  set DI test duration upper bound to 1000 seconds (#5161)
  add missing supported config default value
  [🤖] Update System Tests: https://github.com/DataDog/dd-trace-rb/actions/runs/20401907816 (#5179)
  ...
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.

5 participants