Method not found java.util.Set org.springframework.http.HttpHeaders.entrySet()

This message comes here because while creating issue, it is recommended to discuss here before creating an issue in github.

I am using 1.56.0 java apm agent which is supporting springboot 4.0 and spring webflux on experimental basis according to release notes.

I get following exception

java.lang.NoSuchMethodError: 'java.util.Set org.springframework.http.HttpHeaders.entrySet()' 
     at co.elastic.apm.agent.springwebflux.WebfluxHelper.copyHeaders(WebfluxHelper.java:316) 	
     at co.elastic.apm.agent.springwebflux.WebfluxHelper.fillRequest(WebfluxHelper.java:286) 	
     at co.elastic.apm.agent.springwebflux.WebfluxHelper.endTransaction(WebfluxHelper.java:177) 	
     at co.elastic.apm.agent.springwebflux.TransactionAwareSubscriber.onComplete(TransactionAwareSubscriber.java:177) 	
     at co.elastic.apm.agent.reactor.TracedSubscriber.onComplete(TracedSubscriber.java:141) 	at

Next: I looked at

And understood that as an end consumer I can disable capture of headers as temporary workaround.

My dependencies are :

+- org.springframework.boot:spring-boot-starter-webflux:jar:4.0.7:compile
   \- org.springframework.boot:spring-boot-webflux:jar:4.0.7:compile
      +- org.springframework:spring-webflux:jar:7.0.8:compile

Let me know whether I need to create github issue.

Hi !
There is already a PR that attempts to fix this, it has a few build failures currently and probably still needs a bit of work to be ready to be merged.