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

feat(instrumentation-http)!: reduce public API surface by removing exports and making protected methods private #5124

Merged

Conversation

pichlermarc
Copy link
Member

Which problem is this PR solving?

While working on #5091, I noticed that we can't really change the utils function signatures without introducing a breaking change, they are actually all exported. There's also some protected methods that are part of the public API which we may not want to be there.

This PR introduces the following breaking changes:

  • removes all utils exports (these were, from what I can tell, all intended for internal consumption, not for the user)
  • removes all exports from types that are not used in the options or public/protected methods, and moves them to internal-types instead
  • makes all _getPatch* methods private (they were previously protected)

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

  • Existing tests

@pichlermarc pichlermarc changed the title feat(instrumentation-http):! reduce public API surface by removing exports and making protected methods private feat(instrumentation-http)!: reduce public API surface by removing exports and making protected methods private Nov 7, 2024
Copy link

codecov bot commented Nov 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.18%. Comparing base (72c9af9) to head (3642217).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5124   +/-   ##
=======================================
  Coverage   93.18%   93.18%           
=======================================
  Files         315      315           
  Lines        8086     8086           
  Branches     1617     1617           
=======================================
  Hits         7535     7535           
  Misses        551      551           

@pichlermarc pichlermarc marked this pull request as ready for review November 7, 2024 19:32
@pichlermarc pichlermarc requested a review from a team as a code owner November 7, 2024 19:32
Copy link
Member

@hectorhdzg hectorhdzg left a comment

Choose a reason for hiding this comment

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

LGTM

pichlermarc and others added 2 commits November 8, 2024 09:12
…nternal-types.ts

Co-authored-by: Hector Hernandez <39923391+hectorhdzg@users.noreply.github.com>
…nternal-types.ts

Co-authored-by: Hector Hernandez <39923391+hectorhdzg@users.noreply.github.com>
@pichlermarc pichlermarc added this pull request to the merge queue Nov 8, 2024
Merged via the queue into open-telemetry:main with commit 030aff3 Nov 8, 2024
21 checks passed
@pichlermarc pichlermarc deleted the feat/cleanup-instr-http branch November 8, 2024 16:46
povilasv pushed a commit to povilasv/opentelemetry-js that referenced this pull request Nov 11, 2024
…ports and making protected methods private (open-telemetry#5124)

Co-authored-by: Hector Hernandez <39923391+hectorhdzg@users.noreply.github.com>
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