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.

Provide starters for micrometer-tracing

See original GitHub issue

Getting all the dependencies right for various tracing options is no easy task. We should provide starters to make that easier for users.

For example, using Brave + Zipkin, we need:

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
	<groupId>io.micrometer</groupId>
	<artifactId>micrometer-tracing</artifactId>
</dependency>
<dependency>
	<groupId>io.micrometer</groupId>
	<artifactId>micrometer-tracing-bridge-brave</artifactId>
</dependency>
<dependency>
	<groupId>io.zipkin.reporter2</groupId>
	<artifactId>zipkin-reporter-brave</artifactId>
</dependency>

and, if there’s no RestTemplate or WebClient, we additionally need:

<dependency>
	<groupId>io.zipkin.reporter2</groupId>
	<artifactId>zipkin-sender-urlconnection</artifactId>
</dependency>

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
wilkinsonacommented, Nov 18, 2022

To help us in the future when we’re trying to remember why we reached the decision, here’s a brief summary of what we considered.

The combinations that can be used are listed in the documentation:

  • OpenTelemetry With Zipkin
    • io.micrometer:micrometer-tracing-bridge-otel
    • io.opentelemetry:opentelemetry-exporter-zipkin
  • OpenTelemetry With Wavefront
    • io.micrometer:micrometer-tracing-bridge-otel
    • io.micrometer:micrometer-tracing-reporter-wavefront
  • OpenZipkin Brave With Zipkin
    • io.micrometer:micrometer-tracing-bridge-brave
    • io.zipkin.reporter2:zipkin-reporter-brave
  • OpenZipkin Brave With Wavefront
    • io.micrometer:micrometer-tracing-bridge-brave
    • io.micrometer:micrometer-tracing-reporter-wavefront

Starters are intended to help people to get started but we have four different combinations here. We considered offering a starter for each combination but concluded that offering four starters would be counter productive.

We considered a more opinionated arrangement that would have been somewhat like spring-boot-starter-web and it using spring-boot-starter-tomcat by default. The goal would have been to have a Zipkin or Wavefront starter that uses, say, OpenTelemetry by default and to be able to exclude the OpenTelemetry starter in favour of a Brave starter. Unfortunately, this doesn’t work as the Zipkin dependencies different depending upon whether you’re using OpenTelemetry or Brave.

In the end, given that each combination is only two dependencies, we concluded that it’s easiest to declare those dependencies directly. This isn’t that different to the existing arrangement for metrics where a dependency on the appropriate registry implementation (Prometheus, Datadog, Wavefront, and so on) has to be declared. We can revisit this decision in the future if the code and module structure of the dependencies changes.

1reaction
marcingrzejszczakcommented, Nov 17, 2022

Sure, I’m working on some samples over here https://github.com/micrometer-metrics/micrometer-samples/tree/migrate-sleuth-samples . You can check e.g. mvc and resttemplate to see web related examples (not all of them are already prepared)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Metrics and Tracing: Better Together - Spring
Let's see how tracing and metrics can work together to provide an ... The Actuator starter, in turn, brings in Micrometer, which provides...
Read more >
Micrometer Application Monitoring
Micrometer provides vendor-neutral interfaces for timers, gauges, counters, distribution summaries, and long task timers with a dimensional data model that, ...
Read more >
Spring Boot 3 Webflux application with Micrometer Tracing not ...
I'm replacing Spring Cloud Sleuth to generate log correlation with the new Micrometer Tracing for Spring Boot 3.
Read more >
Spring Boot app metrics - with Prometheus and Micrometer
Micrometer is a set of libraries for Java that allow you to capture ... org.springframework.boot:spring-boot-starter-actuator:jar:2.4.1: ...
Read more >
Using Micrometer Observation API with Reactive Spring Boot 3
Since Spring Framework 6, metrics and tracing get handled by Micrometer - a ... As an example, the MeterObservationHandler provides micrometer Timer and ......
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