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

DEBUG-3182 Rework DI loading #4233

Closed
wants to merge 5 commits into from
Closed

Conversation

p-datadog
Copy link
Member

@p-datadog p-datadog commented Dec 17, 2024

What does this PR do?

This PR separates the part of DI that is required for code tracker (which is the code tracker itself and the DI.current_component group of methods, plus exception classes) to be self-contained. Currently in master loading datadog/di/init would bring in datadog/di as well which is too much (for example, that would cause DI to attempt to load ActiveRecord contrib, which is definitely not the right time for it).

Motivation:

Ensuring DI code tracker is loaded early without causing the rest of dd-trace-rb to be loaded early.

Change log entry

Yes: Improved early loading mechanism of dynamic instrumentation (datadog/di/init).

Additional Notes:

While this PR changes the behavior of datadog/di/init, this behavior has not yet been documented anywhere and should not be used by customers.

How to test the change?

Integration tests specifically for datadog/di/init will be added in a follow-up PR. The existing unit tests verify that basic DI functionality continues to operate correctly.

@p-datadog p-datadog requested a review from a team as a code owner December 17, 2024 14:20
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.

2 participants