- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.1k
          Remove parent observation key instead of setting null
          #5083
        
          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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
When completing a MongoObservation without a parent observation, we now remove the parent observation key from the request context instead of setting it to null. In reactive usage, the context map is a ConcurrentHashMap that does not allow null values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test doesn't seem to reproduce the underlying issue.
Let me know if you want me to look into this.
        
          
                ...ava/org/springframework/data/mongodb/observability/MongoObservationCommandListenerTests.java
          
            Show resolved
            Hide resolved
        
      Clean up residual observations after tests.
| Thanks, this is merged and ported back to supported OSS versions. | 
When completing a MongoObservation without a parent observation, we now remove the parent observation key from the request context instead of setting it to null.
In reactive usage, the context map is a
ConcurrentHashMapthat does not allow null values.Closes #5082