-
Notifications
You must be signed in to change notification settings - Fork 825
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(opencensus-shim) add require-in-the-middle hook to patch @opencensus/core #3809
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3809 +/- ##
==========================================
- Coverage 92.95% 92.94% -0.02%
==========================================
Files 297 299 +2
Lines 9060 9075 +15
Branches 1848 1851 +3
==========================================
+ Hits 8422 8435 +13
- Misses 638 640 +2
|
If moving to
One more RITM hook should be not that problematic (compared to >20 one got via autoinstrumentations in the past). Missing ESM support is maybe also no issue because this shim is to get backward compatibility with a discontinued project where ESM is likely not a big topic anyway. But we should document that ESM is not working for this shim. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation looks ok to me. Just some minor comments
I think we talked about it at the meeting last week but documenting here for clarity: opencensus doesn't support ESM so there should be no expectation it works with the shim |
Which problem is this PR solving?
Part of #3749 [4 of 5]. Final state of the series of PRs: #3778
Short description of the changes
Adds a
require-in-the-middle
hook to patch@opencensus/core
to return a ShimTracers. Includes a register script that can be used likenode -r @opentelemetry/shim-opencensus/register ...
to automatically install the hook at startup.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Added tests in this PR. I also have an example in the next PR which I tested out to be working.
Checklist: