we have an application using spring cloud gateway,and we find some problems on apm,seems like java agent do not support spring cloud gateway (yet) ? see below for details.
Kibana version:7.17.3
Elasticsearch version:7.17.3
APM Server version:7.17.3
APM Agent language and version:Java 1.33.0
Browser version:Chrome
Original install method (e.g. download page, yum, deb, from source, etc.) and version:docker
Fresh install or upgraded from other version? fresh
Is there anything special in your setup? just simple setup,no addition config
Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
we use the following version of frameworks:
JDK version: 11
Spring cloud gateway (SCG) version: 3.1.3
spring webflux version(from SCG): 5.3.20
reactor-netty(from spring webflux): 1.0.19
enhancement to our gateway:
- we write filters, very simple filters(rewrite url, call redis etc..), which implents org.springframework.web.server.WebFilter (not scg's gatewayfilter, not good choice i know , for some reason i can't change..);
- our gateway send outbound requests, just use scg's own feature, which calls reactor-netty directly(yes,they don't use their own webclient);
after setup apm agent, run some requests to gateway, we don't get expected results:
- the transaction is stated from spring webflux dispatchhandler, which means the filters implements from webfilters are not captured; these filters are called from defaultwebfilterchain, which is in spring-web module, followed by reactor-netty, not arrive webflux yet.
- gateway outbound requests are missing from apm,no http span. the requests use reactor-netty's httpclient directly, i think that's the cause, the elasic apm not support that framework.
by contrast, opentelemetry's java agent works ok: filters, outbounds are captured, and kibana shows well.
but we like elastic apm agent more, it has jvm metrics out of box, and excellent profile/central config features.
so, is this true that elastic apm not support scg yet, or did i miss something?
Steps to reproduce:
- write simple scg applications
- setup apm agent
- run
Errors in browser console (if relevant): no error logs
Provide logs and/or server output (if relevant): nothing special from output