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

[WIP] Component dependency manager #2849

Closed
wants to merge 34 commits into from
Closed

Conversation

marcotc
Copy link
Member

@marcotc marcotc commented May 15, 2023

[The PR has not undergone any clean up. Naming of classes/modules are all up for change. File organization will be changed as well]

As part of the remote configuration effort, this PR changes the underlying component lifecycle management to use dependency injection.

This provides the following features:

  • Components now declare all settings and components that they depend on.
    • This allows for a minimal and confident reconfiguration of components when settings are changed.
    • Components can additionally declare that they support "in-flight" reconfiguration (e.g. Sampling.sampling_rate=, instead of the default Sampling.new(sampling_rate)). This can reduce even further the overhead of reconfiguration.
    • It is not possible to create consistency component declaration: circular dependencies, forgetting to declare a dependency. All these error will be caught early in testing, when components are first loaded by ddtrace.
  • Testing isolation is improved, as access to the global Datadog.configuration to retrieve settings is removed from components, and instead configuration is provided at initialization time.
  • We don't have to initialize all components eagerly on initialization.
    • Full eager loading is still the behavior in this PR, to minimize risk, but this can be relaxed in the future.

@marcotc marcotc changed the title Component dependency Component dependency manager May 15, 2023
@github-actions github-actions bot added appsec Application Security monitoring product ci-app CI product for test suite instrumentation core Involves Datadog core libraries profiling Involves Datadog profiling tracing labels May 15, 2023
@marcotc marcotc changed the title Component dependency manager [WIP] Component dependency manager May 15, 2023
@marcotc marcotc closed this Oct 26, 2023
@GustavoCaso GustavoCaso deleted the component-dependency branch October 27, 2023 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appsec Application Security monitoring product ci-app CI product for test suite instrumentation core Involves Datadog core libraries profiling Involves Datadog profiling tracing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant