Skip to content

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

Merged
pichlermarc merged 6 commits into
open-telemetry:mainfrom
dynatrace-oss-contrib:feat/cleanup-instr-http
Nov 8, 2024
Merged

feat(instrumentation-http)!: reduce public API surface by removing exports and making protected methods private#5124
pichlermarc merged 6 commits into
open-telemetry:mainfrom
dynatrace-oss-contrib:feat/cleanup-instr-http

Conversation

@pichlermarc

Copy link
Copy Markdown
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
@codecov

codecov Bot commented Nov 7, 2024

Copy link
Copy Markdown

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
Comment thread experimental/packages/opentelemetry-instrumentation-http/src/internal-types.ts Outdated
Comment thread experimental/packages/opentelemetry-instrumentation-http/src/internal-types.ts Outdated

@hectorhdzg hectorhdzg left a comment

Copy link
Copy Markdown
Member

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
@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