Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Boot WebFlux 3.0.3 + Spring Data Reactive Mongo missing trace IDs #34374

Closed
davidmelia opened this issue Feb 24, 2023 · 3 comments
Closed
Labels
for: external-project For an external project and not something we can fix status: invalid An issue that we don't feel is valid

Comments

@davidmelia
Copy link

Hi,

I'm currently testing the new Hooks.enableAutomaticContextPropagation(); and am getting missing trace IDs in any project with Spring Data (Mongo and Redis)

https://github.com/davidmelia/spring-boot-kafka-consumer-tracing/tree/spring_data_mongo_trace_issue shows the problem where hitting http://localhost:8080/home gives

INFO [aid=spring-boot-kafka-consumer-tracing,tid=63f8dcaf43b4584810874449c7f8e250,sid=10874449c7f8e250,cusname=] 88765 --- [ctor-http-nio-2] com.example.demo.HomeController          : has a trace id
INFO [aid=spring-boot-kafka-consumer-tracing,tid=,sid=,cusname=] 88765 --- [ntLoopGroup-3-3] com.example.demo.HomeController          : does not have a trace id
@RestController
@Slf4j
public class HomeController {

  @Autowired
  private CustomerRepository repository;

  @GetMapping(value = "/home", produces = MediaType.APPLICATION_JSON_VALUE)
  public Mono<Map<Object, Object>> sendMessage() {
    log.info("has a trace id");
    return repository.findByFirstName("Alice").map(c -> {
      log.info("does not have a trace id");
      return Map.of(c.firstName, c.lastName);
    });


  }

}

While this is spring data I wonder if this issue is more fundamental?

Thanks

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 24, 2023
@mhalbritter
Copy link
Contributor

Thanks for the report. I've asked the context propagation / reactor team for feedback.

@mhalbritter mhalbritter added the status: waiting-for-internal-feedback An issue that needs input from a member or another Spring Team label Feb 27, 2023
@mhalbritter
Copy link
Contributor

mhalbritter commented Feb 27, 2023

Hey, have you used handle/tap before and the logs were working but with the new one it’s not happening? If yes, then it's a bug. It also depends on what Data MongoDB does with the executor. Please open that issue on the Spring Data MongoDB tracker for further investigation and please link back to this ticket. Thanks!

@mhalbritter mhalbritter closed this as not planned Won't fix, can't repro, duplicate, stale Feb 27, 2023
@mhalbritter mhalbritter added status: invalid An issue that we don't feel is valid for: external-project For an external project and not something we can fix and removed status: waiting-for-triage An issue we've not yet triaged status: waiting-for-internal-feedback An issue that needs input from a member or another Spring Team labels Feb 27, 2023
@mhalbritter
Copy link
Contributor

Just got an update from reactor team: this issue will be automatically fixed once reactor/reactor-core#3366 is implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project For an external project and not something we can fix status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

3 participants