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): make InstrumentationAbstract.init public #4418

Merged
merged 5 commits into from
Feb 5, 2024

Conversation

drewcorlin1
Copy link
Contributor

@drewcorlin1 drewcorlin1 commented Jan 16, 2024

Which problem is this PR solving?

For the esbuild instrumentation plugin I'm attempting to rely on .init() at build time to get info about instrumentations, and in order for that to typecheck I need public access to this method.

Fixes # (issue)

Short description of the changes

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Compile this package and use it in that plugin (locally).
In this repo:

  • npm run compile
  • cd experimental/packages/opentelemetry-instrumentation
  • npm pack

In my fork of the opentelemetry-js-contrib on the esbuild-plugin branch (which is in the same directory as opentelemetry-js)

  • cd packages/esbuild-plugin-node
  • npm i ../../../opentelemetry-js/experimental/packages/opentelemetry-instrumentation-grpc/opentelemetry-instrumentation-0.47.0.tgz

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

Copy link

codecov bot commented Jan 16, 2024

Codecov Report

Merging #4418 (653d25d) into main (2df6310) will decrease coverage by 1.56%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4418      +/-   ##
==========================================
- Coverage   92.37%   90.81%   -1.56%     
==========================================
  Files         304       87     -217     
  Lines        8682     1906    -6776     
  Branches     1831      405    -1426     
==========================================
- Hits         8020     1731    -6289     
+ Misses        662      175     -487     

see 219 files with indirect coverage changes

Copy link
Member

@dyladan dyladan left a comment

Choose a reason for hiding this comment

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

Change from protected to public is technically expanding the API surface, but only minimally. I'm fine with it if the other maintainers are.

Copy link
Member

@pichlermarc pichlermarc left a comment

Choose a reason for hiding this comment

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

I'm also okay with this change. 👍
Just one comment about the documentation of init()

@pichlermarc pichlermarc changed the title Make InstrumentationAbstract.init public feat(instrumentation): make InstrumentationAbstract.init public Jan 31, 2024
Copy link
Member

@pichlermarc pichlermarc left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for updating the JSdoc 🙂

@drewcorlin1
Copy link
Contributor Author

@pichlermarc could you merge when you get a moment? thanks!

@pichlermarc pichlermarc merged commit 0229434 into open-telemetry:main Feb 5, 2024
16 of 17 checks passed
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.

None yet

3 participants