TransWikia.com

How to customize sleuth span in spring reactor?

Stack Overflow Asked by voipp on December 12, 2020

I enabled sleuth in spring reactor:

spring.sleuth.enabled: true
spring.sleuth.reactor.enabled: true

In spring boot sample app declared and run my program:

@EventListener(classes = ApplicationReadyEvent.class)
    public void executeSendingNotificationToServer() { 

   return Mono.fromRunnable(() -> {
     tracer.currentSpan().tag("sample-key", "sample-value");
   })
   .then(<other business logic>)...

Then I run jaeger and see traces coming from my app.
There are only traces with name "async", and there are no tags with the key "sample-key".

Help me please, how to assign tags to span in my flux?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP