fix: handled non-promise return from instrumented pg call#2335
Open
abhilash-sivan wants to merge 2 commits intomainfrom
Open
fix: handled non-promise return from instrumented pg call#2335abhilash-sivan wants to merge 2 commits intomainfrom
abhilash-sivan wants to merge 2 commits intomainfrom
Conversation
kirrg001
reviewed
Feb 12, 2026
| spanName, | ||
| operationContext | ||
| ) { | ||
| if (typeof returnValue?.then === 'function') { |
Contributor
Author
There was a problem hiding this comment.
Yeah, this is not required; we are only calling this function if the return value does not have a then property. I will remove this
kirrg001
reviewed
Feb 12, 2026
| } | ||
|
|
||
| // Case: This is the unexpected case where returnValue is not a promise | ||
| logger.debug( |
Contributor
There was a problem hiding this comment.
I'd like to suggest to keep this simpler for now.
- We only log the debug once. Even in debug mode, we do not want to flood the logs.
- No custom tagging. This not really a tag. We don't have a field for warnings, but this case is too special to add anything other than one debug log and the handling.
We can also discuss tmrw 👍
Contributor
Author
There was a problem hiding this comment.
Yeah, I agree with not adding labels to this case, as this is only edge cases, and we don't want our collector to throw type errors at the end.
+1 for debug log only. I will update the logic
Contributor
There was a problem hiding this comment.
Yeah you just need to figure out how to log it only once.
557336a to
ed42573
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


refs https://jsw.ibm.com/browse/INSTA-70534
This PR is an extension of the following case: #2249
This is a split part of the following PR: #2283