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): add getModuleDefinitions() instead of making init() public #4475

Conversation

pichlermarc
Copy link
Member

Which problem is this PR solving?

Reviewing all changes for the next release, I've just realized that the changes from #4418 would be breaking for implementations that add the protected keyword to init(), which turns out to be a lot of them in contrib. This is my proposal, adding a new method that should have the same effect, but won't require changes to instrumentations.

cc @drewcorlin1, I think this would also work, right?
cc @dyladan since you also reviewed #4418

Relates to #4418

Short description of the changes

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Exisitng unit tests
  • Added unit tests

Copy link

codecov bot commented Feb 12, 2024

Codecov Report

Merging #4475 (7168e3d) into main (44b0b29) will decrease coverage by 0.13%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4475      +/-   ##
==========================================
- Coverage   92.55%   92.43%   -0.13%     
==========================================
  Files         315      330      +15     
  Lines        9375     9525     +150     
  Branches     2013     2033      +20     
==========================================
+ Hits         8677     8804     +127     
- Misses        698      721      +23     
Files Coverage Δ
...entelemetry-instrumentation/src/instrumentation.ts 80.48% <100.00%> (+2.71%) ⬆️

... and 16 files with indirect coverage changes

@drewcorlin1
Copy link
Contributor

@pichlermarc yes this should also work! thank you!

@pichlermarc pichlermarc marked this pull request as ready for review February 12, 2024 14:10
@pichlermarc pichlermarc requested a review from a team February 12, 2024 14:10
@drewcorlin1
Copy link
Contributor

@pichlermarc yes this should also work! thank you!

I'll also get back to the esbuild MR once this has been merged, just been waiting to use this without all the @ts-ignore's in that 😄

@pichlermarc pichlermarc merged commit 8bbebfd into open-telemetry:main Feb 15, 2024
20 checks passed
@pichlermarc pichlermarc deleted the feat/get-module-definitions branch February 15, 2024 12:59
Zirak pushed a commit to Zirak/opentelemetry-js that referenced this pull request Sep 14, 2024
… `init()` public (open-telemetry#4475)

* feat(instrumentation): add getModuleDefinitions() instead of making init() public

* test(instrumetation): add tests for getModuleDefinitions()

* chore: changelog
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