Possible memory leak and failure to restore the observation scope when using a JPA repository from a GraphQL controller #3523
Labels
for: external-project
For an external project and not something we can fix
The context
In my application (Spring Boot
3.2.6
), I'm using the GraphQL, Web and JPA starters.I have created a GraphQL controller, in which I interact with a JPA repository.
I have also enabled observability with Micrometer.
The issue
When I query my controller, everything executes successfully, but I can find this log line (formatted for clarity purpose) :
When I connect my application to an Open Telemetry with a Jaeger backend, just to check if everything is ok in terms of trace and spans, it seems that yeah, everything is ok :
![Issue - Jaeger](https://private-user-images.githubusercontent.com/15066513/336144862-daecce37-a5f0-4cc7-a3ba-6fc8deb80374.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxOTM4NDQsIm5iZiI6MTczOTE5MzU0NCwicGF0aCI6Ii8xNTA2NjUxMy8zMzYxNDQ4NjItZGFlY2NlMzctYTVmMC00Y2M3LWEzYmEtNmZjOGRlYjgwMzc0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDEzMTkwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk0YTJkZTQzMDQ3NTcwNzJhNGZiMWNiNTU2YjJlZDUxYjRjNDNhYjM5MzRhYWVhODgxZDhjMzE3YzJmZDU1YTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.eCf_1JfvMyg5lKJbTOpwfgQrcpzEdm5U3ClmtmQM9hw)
This log is not generated if I remove interaction with my JPA repository.
It's also not generated if I annotate the method of my controller (the one annotated with
@QueryMapping
) with@Observed
, or if I set the propertyspring.jpa.open-in-view
tofalse
(something I prefer not to do).How to reproduce
You can find a sample application right here.
You can query the controller with these information :
http://localhost:8080/graphql
Additional comments
In the original ticket that I've created on Spring Boot project side, @bclozel added this comment, maybe it can give more info :
The text was updated successfully, but these errors were encountered: