-
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
chore(instrumentation-grpc): cleanup remnants of grpc-native support #3886
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3886 +/- ##
==========================================
+ Coverage 91.15% 93.14% +1.98%
==========================================
Files 127 298 +171
Lines 2747 8868 +6121
Branches 548 1826 +1278
==========================================
+ Hits 2504 8260 +5756
- Misses 243 608 +365
|
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.
Generally looks good to me. I think removing metadata from shouldNotTraceServerCall is fine since it is unused and unexported
cc @pichlermarc |
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.
Thanks for taking care of this. 🙂
Just one possible caveat: I'm wondering what happens when we wrap two different versions of @grpc/grpc-js
in the same app. 🤔
experimental/packages/opentelemetry-instrumentation-grpc/src/grpc-js/clientUtils.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-instrumentation-grpc/src/grpc-js/types.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-instrumentation-grpc/src/grpc-js/serverUtils.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-instrumentation-grpc/src/grpc-js/index.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-instrumentation-grpc/src/grpc-js/clientUtils.ts
Outdated
Show resolved
Hide resolved
I reverted the But the problem still exists: In the output JS code, there is still something like |
You can pass Unfortunately, we need to construct |
Nice. |
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.
Looks good; thanks for addressing the comments 🙂
cc @dyladan |
Which problem is this PR solving?
Fixes #3869
Short description of the changes
import * from '@grpc/grpc-js'
and use destructuring imports instead.grpc
instance as a parameter.grpcClient
ingetMetadata()
grpcClient
in_patchClient()
grpcClient
in_patchLoadPackageDefinition()
grpcClient
in_getPatchedClientMethods()
grpcClient
in_patchLoadedPackage()
metadata
inshouldNotTraceServerCall()
*idk if this one should be removed but
metadata
is not used in this function and it's not exported outside the package.Type of change
Please delete options that are not relevant.
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
Checklist: