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.

Add support for Micrometer's new Observation API

See original GitHub issue

Micrometer introduces a new set of APIs in its next minor version (1.10.0). From the high level perspective this API is somewhat similar to a Timer in the sense that it measures elapsed time and you can start/stop your measurements.

The advantage of making measurements using the Observation API over the Timer is that you can attach arbitrary handlers (listeners) who can react to events during your observations, e.g.: an observation was started/stopped and error happened, etc. This makes possible not only recording metrics (delegating to a Timer) but also creating Spans (distributed tracing), attaching logs (audit, trace, perf, etc.) or doing any arbitrary thing that you want.

Basically you instrument your code once and you can get multiple things out of this instrumentation, you don’t need multiple instrumentations.

We have a migration guide that can give more information and also examples for migrating from a Timer-based instrumentation to the Observation API.

What do you think?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
kdavisk6commented, Sep 12, 2022

Apologies, I think this is a very good idea. Feel free to submit any proposals.

1reaction
marcingrzejszczakcommented, Sep 19, 2022

I’ve submitted a draft PR that we can discuss - https://github.com/OpenFeign/feign/pull/1760

Read more comments on GitHub >

github_iconTop Results From Across the Web

Observability with Spring Boot 3
To add observation features to your application, choose spring-boot-starter-actuator (to add Micrometer to the classpath).
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 >
Quick Guide to Micrometer - Baeldung
It provides a solution to publish application metrics to various supported monitoring systems simultaneously. We can add any MeterRegistry ...
Read more >
Micrometer Metrics - Quarkus
Micrometer provides an API that allows you to construct your own custom metrics. The most common types of meters supported by monitoring systems...
Read more >
REST API Monitoring using Micrometer, Prometheus, Grafana ...
Meters in Micrometer are created from and held in a MeterRegistry . Each supported monitoring system has an implementation of MeterRegistry .
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