# APM for spring webflux

**URL:** <https://discuss.elastic.co/t/apm-for-spring-webflux/210637>\
**Category:** APM\
**Tags:** java\
**Created:** [December 5, 2019, 7:50am UTC](https://discuss.elastic.co/t/apm-for-spring-webflux/210637 "2019-12-05T07:50:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdith](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@sdith](https://discuss.elastic.co/u/sdith)\
**Post date:** [December 5, 2019, 7:50am UTC](https://discuss.elastic.co/t/apm-for-spring-webflux/210637/1 "2019-12-05T07:50:22Z")

</div>

Our technology stack is spring webflux. To support Elastic APM, we use the elastic apm bridge and opentracing-spring-cloud-starter. Works very well in the following versions:  
elasticsearch version: 5.x  
apm agent version: 1.6.1  
apm opentracing version: 1.6.1  
opentracing-spring-cloud-starter version: 0.2.6

Due to company's elasticsearch version upgrade to 6.6.5，the agent version 1.6.1 is not fit.  
so we upgrade the version of agent. However there is no version compatible between agent and opentracing-spring-cloud-starter. Either there is no span, or service startup error with reporting no class method.

I have no idea how to do.

---

<div class="post-metadata">

**Author:** ![Sylvain\_Juge](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain_juge/32/55521_2.png) [@Sylvain\_Juge](https://discuss.elastic.co/u/Sylvain_Juge)\
**Post date:** [December 5, 2019, 5:09pm UTC](https://discuss.elastic.co/t/apm-for-spring-webflux/210637/2 "2019-12-05T17:09:54Z")

</div>

Hi @sdith,

Thanks for reporting an issue, could you provide more details about the errors you have ?

Which version of the agent did you tried to update to ? the latest one (1.12.0) or an older one like 1.9.0 which supports opentracing version 0.33 ?

---

<div class="post-metadata">

**Author:** ![sdith](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@sdith](https://discuss.elastic.co/u/sdith)\
**Post date:** [December 6, 2019, 7:02am UTC](https://discuss.elastic.co/t/apm-for-spring-webflux/210637/3 "2019-12-06T07:02:15Z")

</div>

Thanks Reply.

I have tried all versions. Some examples of version combinations and their problems are as follows:  
First:  
elastic-apm-agent(v1.9.1)  
apm-opentracing(v1.9.0 support io.opentracing version 0.33.0)  
opentracing-spring-cloud-starter(v0.2.6, support io.opentracing version 0.31.0)

This combination will cause application request to be unavailable, the log is:

 ![apm1](https://us1.discourse-cdn.com/elastic/original/3X/8/8/88d37c80e8530611aa4cf9c43f5602b25697e4c6.png)

Second:  
elastic-apm-agent(v1.9.1)  
apm-opentracing(v1.9.0, support io.opentracing version 0.33.0)  
opentracing-spring-cloud-starter(v0.3.11, this is the latest version, support io.opentracing version 0.32.0)

This combination caused problem is the same as the first.

Third:  
elastic-apm-agent(v1.9.1)  
apm-opentracing(v1.8.0, support io.opentracing version 0.31.0)  
opentracing-spring-cloud-starter(v0.2.6, support io.opentracing version 0.31.0)

The application is ok, but there is no span in the transaction at the kibana apm.

 ![apm2](https://us1.discourse-cdn.com/elastic/original/3X/b/9/b970d2821ea6293aa7aeab15577b97e4226691e3.png)

---

<div class="post-metadata">

**Author:** ![Sylvain\_Juge](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain_juge/32/55521_2.png) [@Sylvain\_Juge](https://discuss.elastic.co/u/Sylvain_Juge)\
**Post date:** [December 6, 2019, 1:21pm UTC](https://discuss.elastic.co/t/apm-for-spring-webflux/210637/4 "2019-12-06T13:21:25Z")

</div>

I've found that some methods have been removed in opentracing version 0.33 ([see CHANGELOG](https://github.com/opentracing/opentracing-java/blob/5ed6a47975ed9a19c8de3bcbe27a9385a14de479/CHANGELOG.md))

Thus any component using version 0.31 (or 0.32) version of opentracing will break with 0.33 with similar errors.

Version 1.8.0 of the agent relies on opentracing 0.31, which explains why does this error does not happen with it.

Regarding the lack of spans in spring-webflux with opentracing bridge, I need to investigate a bit on my side to know what could go wrong.

---

<div class="post-metadata">

**Author:** ![Sylvain\_Juge](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain_juge/32/55521_2.png) [@Sylvain\_Juge](https://discuss.elastic.co/u/Sylvain_Juge)\
**Post date:** [December 6, 2019, 2:38pm UTC](https://discuss.elastic.co/t/apm-for-spring-webflux/210637/5 "2019-12-06T14:38:30Z")

</div>

Latest agent release (1.12.0) is compatible with any apm-server version \>= 6.5.  
If it is not compatible, then it's a bug and we should report it.

Could you try with latest version of our agent (1.12.0) and just downgrade `apm-opentracing` to version `1.8.0` ?

---

<div class="post-metadata">

**Author:** ![sdith](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@sdith](https://discuss.elastic.co/u/sdith)\
**Post date:** [December 6, 2019, 3:18pm UTC](https://discuss.elastic.co/t/apm-for-spring-webflux/210637/6 "2019-12-06T15:18:44Z")

</div>

Yes, I have tried it. The latest agent is compatible with apm-server version=6.5. \*.  
However it's lack of span with the apm-opentracing (v1.8.0).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 27, 2019, 11:19am UTC](https://discuss.elastic.co/t/apm-for-spring-webflux/210637/7 "2019-12-27T11:19:00Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
