-
Notifications
You must be signed in to change notification settings - Fork 586
Description
What version of OpenTelemetry are you using?
- @opentelemetry/api@1.8.0
- @opentelemetry/auto-instrumentations-node@0.50.2
What version of Node are you using?
20
What did you do?
I am working on an esbuild plugin version of this library and noticed that the @opentelemetry/instrumentation-redis-4
package relies on the function name of classes. This can break when code is bundled due to bundlers renaming symbols.
It's worth noting that with esbuild there is a workaround, to use keepNames, but this a lot of diving into the instrumentation source code to discover the cause of the issue.
I know that feature is not merged, but based on the comments there seems to be demand for it, so relying on function names will be potentially problematic for any bundler-based instrumentations of this library.
Update (trentm): #2915 moved the instr-redis-4 code into the instr-redis package. The new relevant code link is now:
opentelemetry-js-contrib/plugins/node/opentelemetry-instrumentation-redis/src/v4/instrumentation.ts
Line 231 in 5988c79
if (config?.BaseClass?.name !== 'RedisClient') { |