opentelemetry-js icon indicating copy to clipboard operation
opentelemetry-js copied to clipboard

chore: export shimmer functions

Open Joozty opened this issue 4 months ago • 4 comments

Which problem is this PR solving?

I need to override some functionality in my code. I want to use new wrapper functions instead of relying on the old shimmer, which is incorrectly typed. I added an export so that I can use these new functions in my derived code, which is heavily based on OTel.

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)
  • [x] 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?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [ ] Test A

Checklist:

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

Joozty avatar Aug 20 '25 09:08 Joozty

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: Joozty / name: Jozef Harag (55e7a6cc784c936510b42eb1984c99e1ef9d89bb, 167087ab1815b3fc2bd198ddcbef5f742ed247e8, dc1a89690693b690912e254d7be44d9ddd6f0fd8, 8c7831c937ad12af628bfc2872d8bd7a3b5c671c, 747a73fb4dfe4062d5274edf7420cce97913f06e)

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 95.03%. Comparing base (8d0dcea) to head (8c7831c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5865   +/-   ##
=======================================
  Coverage   95.03%   95.03%           
=======================================
  Files         306      306           
  Lines        7969     7969           
  Branches     1611     1611           
=======================================
  Hits         7573     7573           
  Misses        396      396           
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Aug 20 '25 11:08 codecov[bot]

I also don't have a strong preference. Though if we do export these, we should also deprecate the re-exports on the instrumentation base classes so that people are not left wondering which one is the "correct" one to use now.

@pichlermarc can you please point out to me where this should be deprecated?

Joozty avatar Sep 08 '25 09:09 Joozty

@Joozty sorry for the late response - the ones I meant that we should deprecate are here on InstrumentationAbstract:

  • https://github.com/open-telemetry/opentelemetry-js/blob/09bf31eb966bab627e76a6c5c05c6e51ccd2f387/experimental/packages/opentelemetry-instrumentation/src/instrumentation.ts#L68-L75

pichlermarc avatar Sep 30 '25 14:09 pichlermarc