Do not depend on function names for instrumentation #2522
Labels
bug
Something isn't working
pkg:instrumentation-redis-4
priority:p4
Bugs and spec inconsistencies which do not fall into a higher prioritization
What version of OpenTelemetry are you using?
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.
The text was updated successfully, but these errors were encountered: