quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.83k stars 2.7k forks source link

Observability abstraction layer. #29911

Open brunobat opened 1 year ago

brunobat commented 1 year ago

Description

We have instrumentation comming from many places: OTel Tracing, Micrometer metrics, MP Metrics... In the future this is likely to grow, meaning we need to create an abstraction that will help to wire many diferent observability related libraries into the main Quarkus libraries.

This might be implemented using an existing framework or coming up with our own.

Dependent on this issue: https://github.com/quarkusio/quarkus/issues/30712

Implementation ideas

No response

musufyian commented 1 year ago

@brunobat how can I contribute to this initiative ?

brunobat commented 1 year ago

Hi @musufyian Are you familiar with OpenTelemetry or Micrometer?

t1 commented 1 year ago

I have the impression that currently everything moves towards OTel... and that's already a pretty generic standard. Do you have more detailed ideas as to how another level of abstraction ontop of this would look like?

brunobat commented 1 year ago

Yes @t1. I'm seriously considering this: https://micrometer.io/docs/observation

t1 commented 1 year ago

Isn't Micrometer Observation on a too high level of abstraction? I.e., it doesn't support the concept of Traces, etc. I'm not sure if that would actually be a step backwards.

t1 commented 1 year ago

Hmmm... I assume you would use Micrometer Tracing for Tracing, but this is only about Observability. I guess that I got it, now 😁

brunobat commented 1 year ago

No, The observation API allows generic instrumentation with multiple libraries and is totally independent from the actual Micrometer metrics and tracing. That's why it's interesting

mederel commented 1 year ago

Hi, I have the impression the OpenTelemetry API (its metrics part if we are talking about that) could be directly the good candidate to fill the position of the abstraction layer. If one wants to continue using micrometer as a "backend" for metrics there is the https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/micrometer-meter-provider. It would allow to keep both during a transition phase.

EDIT: I guess after seeing a comment here that the point is that for metrics the OpenTelemetry API is lacking some of the feature of micrometer.

brunobat commented 1 year ago

Thanks @mederel. The idea here is to instrument libraries in one place and be able to then plug different metrics and tracing implementations... Currently we have to instrument everything with OTel and Micrometer because users can chose to use both or each one of them.

kerkhofsd commented 1 month ago

Any update on this topic?

In the Quarkus documentation for OpenTelmetry, the following is mentioned:

In the future, we plan to bridge current Micrometer metrics to OpenTelemetry and maintain compatibility when possible.

Can this "bridge" be considered part of this scope?

brunobat commented 1 month ago

Can this "bridge" be considered part of this scope?

Yes @kerkhofsd and I plan to work on this until the end of the year.

kerkhofsd commented 1 month ago

Great, thanks for the feedback @brunobat !