Reputation: 45
I am recently looking for the distributed tracing solution for my microservice architecture. my microservice architecture involved multiple different types of java application will be running.
I have to provide the observability feature (logs, metrics and tracing) to my microservice solution. I came across multiple possible options like sleuth (deprecated), micrometer, opentelemetry, zipkin, jaeger, signoz and prometheus for this.
After referring all the blogs, I understood like we can use the above application as a combination, like
sleuth + zipkin
micrometer + opentelemetry + jaegar + prometheus
micrometer + opentelemetry + signoz
opentelemetry + zipkin
Here, the sleuth and micrometer will be used to generate traceid and span id. micrometer has some extra advantage than sleuth that it supports metrics as well.
My question is, what is the role of opentelemetry here? is opentelemetry requires sleuth or micrometer for adding traceid/spanid? opentelemetry has any inbuild automatic instrumentation for adding traceid/span id?
PS opentelemetry will act as a bridge between multiple receivers to multiple exporters. but what advantages it additionally provides?
Thanks in Advance
Upvotes: 4
Views: 2586
Reputation: 1729
BLUF: OpenTelemetry can be used for everything!
You do not need Sleuth or Micrometer. You can add OTel auto-instrumentation to all your apps, if it is available for your language (for Java, it is, via an agent). This will provide a ton of metrics and traces for the libs used by your app (e.g. Hibernate, Kafka). If you then want to create custom metrics/traces within your app, you can again use the OTel API.
So Sleuth is dead. Micrometer can do some of the above, but it has no auto-instrumentation, so you will need to add boilerplate. It only works for Java. The number of libraries it instruments seems low (7 listed here only - https://micrometer.io/docs). Also, Spring Boot 3 uses Micrometer under the hood. This is surprising to me, since OTel is becoming the standard. I guess they did this since they had such an investment already in this library. On this though, the OTel auto-instrumentation will translate any icrometer metrics/traces to OTel.
Hope that helps
Upvotes: 1