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

ekump/decouple core transport #3150

Merged
merged 22 commits into from
Sep 25, 2023
Merged

ekump/decouple core transport #3150

merged 22 commits into from
Sep 25, 2023

Conversation

ekump
Copy link
Contributor

@ekump ekump commented Sep 21, 2023

What does this PR do?
Properly namespace the various transport modules to aid in decoupling Tracing from Core. There should be no functional changes.

Datadog::Transport (ddtrace/transport) was primarily used by Tracing so it has been moved to Datadog::Tracing::Transport. The exception to this is the ext file which is a public API. We should discuss moving this in 2.0 (should be relatively easy).

Datadog::Core::Transport was only used by Datadog::Core::Remote. It has been moved to Datadog::Core::Remote::Transport.

Files common to both Remote and Tracing were moved to Datadog::Core::Transport.

Motivation:
Decouple Tracing from Core

Additional Notes:
The scope of this PR is primarily decoupling. There is probably a fair amount of work that can be done to simplify the transport code in general, but that can be done separately.

How to test the change?

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles
    credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

Unsure? Have a question? Request a review!

@github-actions github-actions bot added core Involves Datadog core libraries integrations Involves tracing integrations tracing labels Sep 21, 2023
@ekump ekump force-pushed the ekump/decouple-core-transport branch 4 times, most recently from 121d9c1 to 1314404 Compare September 21, 2023 20:14
@github-actions github-actions bot added the profiling Involves Datadog profiling label Sep 22, 2023
@ekump ekump force-pushed the ekump/decouple-core-transport branch from c3f5bb3 to 7a186e3 Compare September 22, 2023 18:39
@ekump ekump force-pushed the ekump/decouple-core-transport branch from 7a186e3 to caecc2c Compare September 22, 2023 20:32
@ekump ekump marked this pull request as ready for review September 22, 2023 20:33
@ekump ekump requested a review from a team September 22, 2023 20:33
@@ -32,12 +32,6 @@ Lint/MissingSuper:
- 'lib/datadog/profiling/pprof/converter.rb'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup!

Copy link
Member

@marcotc marcotc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work, @ekump!

Copy link
Member

@anmarchenko anmarchenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, I will migrate to use Net::HTTP adapter from Core for agentless mode as soon as it gets merged

Comment on lines +18 to +19
# Below should be:
# require_relative '../../transport/http/api'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment relevant?

Comment on lines +26 to +27
# Below should be:
# require_relative '../../transport/http/builder'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment relevant?

Comment on lines +15 to +16
# Below should be:
# require_relative '../../../../ddtrace/transport/http/api/spec'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment relevant? And any other comment that state what the actual require should look like 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These comments were already in place. I just updated them to reflect this PR's changes. If we think they're superfluous, I'm happy to remove them.

@GustavoCaso
Copy link
Member

Amazing work @ekump 🎉

I wondered if you explored avoiding the duplicated portions of core/transport and tracing/transport and trying to work with what we currently have to not have the code duplicated? Or if we plan on working on subsequent PR to have a more flexible core transport that remote, tracing, and CI can use?

@ekump
Copy link
Contributor Author

ekump commented Sep 25, 2023

Amazing work @ekump 🎉

I wondered if you explored avoiding the duplicated portions of core/transport and tracing/transport and trying to work with what we currently have to not have the code duplicated? Or if we plan on working on subsequent PR to have a more flexible core transport that remote, tracing, and CI can use?

@GustavoCaso - I think there is a fair amount of interest from everyone to a) simplify transport and b) do what we can to reduce the duplicate code between remote and tracing. But, the scope of this PR was just decoupling. I'm hoping we'll be able to revisit the transport code sooner, rather than later to give it more attention.

@ekump ekump merged commit 9810fe0 into master Sep 25, 2023
217 checks passed
@ekump ekump deleted the ekump/decouple-core-transport branch September 25, 2023 19:42
@github-actions github-actions bot added this to the 1.15.0 milestone Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Involves Datadog core libraries integrations Involves tracing integrations profiling Involves Datadog profiling tracing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants