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 observability via Micrometer 1.10.0 & Micrometer Tracing

See original GitHub issue

Introduction

With Micrometer 1.10.0 we’re introducing a concept of an Observation (you can read more about it here). An Observation wraps an action that we would like to measure. A measurement can be wrapping it in a Timer (metrics), creation of a Span (tracing) or any other custom behavior such as e.g. logging.

Let’s check the following example

ObservationRegistry registry = new ObservationRegistry.create();
Observation observation = Observation.start("my.operation", registry).scoped(() -> doSomeWorkHere());

Depending on the configuration of the ObservationRegistry there might be various outcomes when doSomeWorkHere() gets executed.

Benefit

Using the Observation API makes you instrument your code once but you get multiple benefits out of it (e.g. metrics & tracing). Since Micrometer Tracing works with Micrometer we also bridge the span creation to such tracer implementations as OpenZipkin Brave and OpenTelemetry.

Feature request

We would like to suggest that such instrumentation using Micrometer would happen in this project. Doing so would allow us to transparently continue any traces that occurred on the client side and have consistency in terms of used metrics. You could also emit metrics and traces (and whatever you want really) on the server side.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:22 (21 by maintainers)

github_iconTop GitHub Comments

1reaction
RobWincommented, May 9, 2022

Hi, I don’t plan to maintain 1.7.X anymore since it’s too much effort for me alone 😦 You can create a PR against master.

1reaction
marcingrzejszczakcommented, Feb 11, 2022

OK so once I have some spare cycles I’ll create a PR against 2.0 snapshots of Micrometer and we’ll continue from there!

Read more comments on GitHub >

github_iconTop Results From Across the Web

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 >
Micrometer Application Monitoring
Micrometer is a metrics instrumentation library for JVM-based applications. It provides a simple facade over the instrumentation clients for the most ...
Read more >
Observability with Spring Boot 3
For Micrometer metrics with Prometheus, we need to add the io.micrometer:micrometer-registry-prometheus dependency. Tracing. For Tracing Context ...
Read more >
Newest 'micrometer' Questions - Stack Overflow
Final and for metrics I'm using quarkus-micrometer-registry-prometheus. ... Spring Boot 3 Webflux application with Micrometer Tracing not showing traceId ...
Read more >
Spring Boot 3.0: What to Expect and How to Prepare - Adeva
0-M4: (Flyway 9, Hibernate 6.1,Liquibase 4.13, Lettuce 6.2, Log4j 2.18, Micrometer 1.10.0-M3, Micrometer Tracing 1.0.0-M6, OkHttp 4.10, R2DBC 1.0, Reactor ...
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