Skip to content

DEBUG-3700 more explicitly access active remote #4642

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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

p-datadog
Copy link
Member

@p-datadog p-datadog commented May 12, 2025

What does this PR do?

Removes Datadog::Core::Remote.active_remote and friends and changes the callers of this method to use Datadog.send(:components, allow_initialization: false).

Motivation:
Making code that intends to read component state only do so, by passing allow_initialization: false option to Datadog.send(:components). The issue with unconditional initialization is described in #4619.

The code in this PR only acts when there is an active remote, and is not designed to initialize the tracer.

Change log entry
None

Additional Notes:
Related: #4641

How to test the change?
Existing tests

@github-actions github-actions bot added the core Involves Datadog core libraries label May 12, 2025
Copy link

github-actions bot commented May 12, 2025

Thank you for updating Change log entry section 👏

Visited at: 2025-05-28 19:02:57 UTC

@datadog-datadog-prod-us1
Copy link
Contributor

Datadog Summary

✅ Code Quality    ✅ Code Security    ✅ Dependencies


Was this helpful? Give us feedback!

@p-datadog p-datadog force-pushed the components-init-remote branch from 433e883 to dcd237e Compare May 21, 2025 16:23
@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented May 21, 2025

Datadog Report

Branch report: components-init-remote
Commit report: 1f72ca6
Test service: dd-trace-rb

✅ 0 Failed, 21483 Passed, 1303 Skipped, 4m 1.21s Total Time

@pr-commenter
Copy link

pr-commenter bot commented May 21, 2025

Benchmarks

Benchmark execution time: 2025-05-28 19:29:01

Comparing candidate commit 1f72ca6 in PR branch components-init-remote with baseline commit b76fbae in branch master.

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

@p-datadog p-datadog force-pushed the components-init-remote branch from dcd237e to 1f72ca6 Compare May 28, 2025 18:58
@p-datadog p-datadog changed the title delete active_remote DEBUG-3700 more explicitly access active remote May 28, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants