fix(instrumentation-redis): Return underlying modules from redis instrumentation #3025
+40
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which problem is this PR solving?
Return version-specific module instrumentations from version-agnostic instrumentation, to enable consumers of this library to get access to the instrumentations that are being applied without having to know this instrumentation is really just a wrapper for 2 others.
Short description of the changes
I'm the author of https://github.com/DrewCorlin/opentelemetry-node-bundler-plugins. This library depends on
getModuleDefinitions()
to know what modules to patch (in it's case to patch them during the bundling of an app). Updating to the latest version to support instrumentation of redis@v5 uncovered this.Rather than special casing this in my plugin I thought it made sense to have this module behave consistently with the rest.
Also let me know if I should remove the link to my plugin here. I thought it was useful context, but understand if links to other projects that depend on this aren't desired.