Skip to content
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

fix(instrumentation): drop diag.debug on InstrumentationBase#init not returning any modules #4925

Merged
merged 3 commits into from
Aug 19, 2024

Conversation

trentm
Copy link
Contributor

@trentm trentm commented Aug 16, 2024

Closes: open-telemetry/opentelemetry-js-contrib#2237
Refs: #3308


Back in #3308 a diag.warn No modules instrumentation has been defined for {instr}, nothing with be patched was reduced to being a diag.debug to avoid confusion for users. The aws-lambda instrumentation can reasonably not patching anything.

Another more recent case: instrumentation-undici uses InstrumentationBase but its init() doesn't return any modules to patch because it uses diagnostics-channels to do its instrumentation. This is a second example where it is totally reasonable for an instrumentation to not return any modules for patching from init(). Given it is reasonable to do so, I don't think the diag.debug() is worth it. Sure, it theoretically might catch a programming error in an instrumentation, but I don't think that merits a diag.debug that can cause user confusion. E.g. in open-telemetry/opentelemetry-js-contrib#2237

@trentm trentm self-assigned this Aug 16, 2024
@trentm trentm marked this pull request as ready for review August 16, 2024 00:31
@trentm trentm requested a review from a team August 16, 2024 00:31
@pichlermarc pichlermarc added this pull request to the merge queue Aug 19, 2024
Merged via the queue into open-telemetry:main with commit fb4619b Aug 19, 2024
19 checks passed
@trentm trentm deleted the tm-drop-no-modules-diag-debug branch August 19, 2024 15:16
Zirak pushed a commit to Zirak/opentelemetry-js that referenced this pull request Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[undici] No modules instrumentation has been defined for '@opentelemetry/instrumentation-undici@0.2.0'
2 participants