question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Micrometer trace HTTP request span propagation

See original GitHub issue

We’ve noticed that child spans of HTTP requests were showing up as independent root traces after migrating Spring Cloud GCP to Spring Boot 3.0 (RC2).

In old Spring Cloud Sleuth, HttpTracing bean was enriched with HTTP request parsing. While in Micrometer BraveHttpRequestParser exists, it does not seem to be instantiated or injected into HttpTracing bean in Spring Boot autoconfiguration. In fact, HttpTracing bean configured in Spring Boot looks very minimalistic.

Is there a new mechanism through which we should be extracting existing trace information from HTTP headers?

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
JoeWang1127commented, Nov 28, 2022

Hi @jonatan-ivanov, thanks for your feedback, the @Observed works for me (with extra help from here). You can close the issue, thanks.

0reactions
jonatan-ivanovcommented, Nov 22, 2022

There are a few issues with the sample:

  1. It is quite big, I’m not 100% sure what you are talking about
  2. You are using Sleuth (Sleuth is for Boot 2, if you are using Boot 3 please use Micrometer Tracing)
  3. You are using Brave’s API for things that you should be able to do with the Observation API (also with Micrometer Tracing)

However, compared with sleuth, the default span name is not the annotated method’s name, even change the name or value parameter doesn’t change the span name.

If you mean @NewSpan by this, that won’t work, that annotation is from Sleuth, it should not even be on your classpath (see the second point above). On the first screenshot, everything looks ok to me, if you want an additional span, you can use @Observed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Observability with Spring Boot 3
For Tracing Context Propagation with Micrometer Tracing, we need to pick a tracer bridge (tracer is a library that is used to handle...
Read more >
Understand distributed tracing
The child span creates its own ID and then propagates both that ID (as the parent span ID) and the trace ID in...
Read more >
Using Micrometer Observation API with Reactive Spring Boot 3
This guide will introduce you to Micrometer in Spring Boot 3, gathering metrics from WebFlux, Reactive streams and producing output to a host...
Read more >
Performance Monitoring With OpenTracing, OpenCensus, and ...
Distributed tracing follows requests through traces and spans. ... Spans can include information such as the status of an HTTP request, ...
Read more >
Using OpenTelemetry - Quarkus
getLogger(TracedResource.class); @GET @Produces(MediaType. ... which retrieves the OpenTelemetry Context to extract the current span for propagation.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found