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

refactor: introduce public/private headers #144

Merged
merged 4 commits into from
Aug 20, 2024

Conversation

dmehala
Copy link
Collaborator

@dmehala dmehala commented Aug 14, 2024

Description

This refactor organizes the library headers into public and private categories. Public headers are now exposed in the include directory for external use, while private headers are kept within src directory.

Motivation

To establish a clear separation between the public API and internal code, enhancing maintainability and simplifying the usage of the library.

Additional Notes

The current refactor is still a work in progress. As you can see there's already a lot of changes and I did not want to push a huge PR too difficult to review. I will gradually improve that separation with subsequent PR.

Here's an exhaustive list of remaining work:

  • Remove rate.h from the public API.
  • Remove json_fwd.h from the public API.
  • Remove sampling_decision.h from the public API.
  • Remove sampling_mechanism.h from the public API.
  • Remove span_defaults.h from the public API.
  • Remove span_matcher.h from the public API.
  • Remove trace_segment.h from the public API. (trace_segment is the trace context. Probably worth a renaming).
  • Fix the JSON configuration.
  • Run include-what-you-use.

],
strip_include_prefix = "src/",
strip_include_prefix = "include/",
copts = ["-Isrc/datadog"],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is it still needed?

@dmehala dmehala changed the title refactor: public/private headers refactor: introduce public/private headers Aug 14, 2024
@dmehala dmehala marked this pull request as ready for review August 14, 2024 15:44
@dmehala dmehala requested a review from a team as a code owner August 14, 2024 15:44
@dmehala dmehala requested review from Anilm3 and removed request for a team August 14, 2024 15:44
@codecov-commenter
Copy link

codecov-commenter commented Aug 14, 2024

Codecov Report

Attention: Patch coverage is 93.75000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 94.46%. Comparing base (aa037a9) to head (a8ba0a3).

Files Patch % Lines
src/datadog/remote_config/product.cpp 77.77% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #144   +/-   ##
=======================================
  Coverage   94.46%   94.46%           
=======================================
  Files          73       72    -1     
  Lines        3811     3797   -14     
=======================================
- Hits         3600     3587   -13     
+ Misses        211      210    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dmehala dmehala force-pushed the dmehala/api/public-private-headers branch 2 times, most recently from 6854d22 to f908a27 Compare August 14, 2024 17:04
@dmehala dmehala force-pushed the dmehala/api/public-private-headers branch from f908a27 to cf58690 Compare August 14, 2024 17:08
@dmehala dmehala merged commit d354e96 into main Aug 20, 2024
21 of 22 checks passed
@dmehala dmehala deleted the dmehala/api/public-private-headers branch August 20, 2024 16:03
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.

3 participants