Provide observability via Micrometer 1.10.0 & Micrometer Tracing
See original GitHub issueIntroduction
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:
- Created 2 years ago
- Comments:22 (21 by maintainers)
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.
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!