Open apescione opened 1 year ago
hi @apescione! is this a duplicate of #2941?
No, they are two different issues. This is on reactor netty web server, and the java agent is not able to trace requests for Server Sent Event API. The other issue is that the java agent is not able to suppress "IOException: Broken pipe" on Tomcat embedded web server.
@apescione can i use the same app to repro? https://github.com/apescione/applicationinsightTestApps
Yes, but you need to remove tomcat and netty exclusion so that you can change the embedded server and reproduce this issue. change this
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-reactor-netty</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
with
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
This is because netty is the default server for web-flux.
Context
I'm using a Spring Boot Application (Java) and WebFlux as the web layer (Reactor), and Reactor Netty is used as an Embedded web server. In my application, I've Server-Sent-Event API like this:
This API sends events to clients using a HOT Stream. I'm using the Application Insights java agent to instrument my application deployed into a docker container. I cannot see in Application insights, Log section the requests through this API. I can see other API's requests. This behavior is only with netty (default embedded web server for spring webflux), but not with undertow and tomcat.
Expected behavior I am seeing the invocation request in Application insight for Server Sent Event API.
Actual behavior Java Agent cannot send Request log to application insight ... To Reproduce It's very simple, create with web flux a server sent event api that produces an event every few seconds, connect the client (browser is enough).
System information Please provide the following information:
SDK Version: Java 8 Zulu, Spring Boot 2.6.8, Webflux 5.3.20, netty 4.1.77 OS type and version: Container Linux alphine Application Insight Java Agent version 3.4.9
Many thanks for considering my request.