-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Micrometer Observation Support #20845
Comments
cc @asafm @michaeljmarshall @BewareMyPower may you have inputs in this topic? |
Hi @marcingrzejszczak. I'm working on revamping metrics for Pulsar. I'm currently at stage of discussions on my PIP: #20197. I can see the value of Micrometer for application developers, but less for Pulsar brokers and other components. You can see why the PIP chose OpenTelemetry and read what we saw as issues with other libraries under "Why not other libraries?" section in the PIP. |
The issue had no activity for 30 days, mark with Stale label. |
Hi @asafm . Sorry for the gigantic delay in answering to your comment. I can't find the "Why not other libraries?" section in the PIP. Can you point me to that point again, please? Thank you. |
I found it! Thanks for creating such an extensive document! I will address parts of it below.
With Micrometer Observation you can use 1 Java API to instrument for whatever observability pillars (metrics, traces etc.). With OTel you will need to use as many APIs as necessary to achieve the same goal.
The status of semantic conventions in OTel is still mixed or experimental for many of its parts. In Micrometer, through the Micrometer Observation Convention mechanism you can gradually migrate from certain naming conventions to other ones. You can do the same just for metrics (through
Micrometer Docs Generator already provides this feature. You can have your code scanned and produce documentation out of it. Example for Spring Cloud Task.
I would be cautious about statements like that following the history of OpenTracing (e.g. Couchbase went all in on OT and now they created their own facade). With Micrometer, Micrometer Observation and Micrometer Tracing you have facades created in such a way that the user can define which “standard” they want to use and when there’s the “next standard” they will be able to migrate to it with minimal code changes.
It sounds a little bit like comparing incomparable libraries. You can’t compare a logging library to a metrics library. We were stating that we are like Slf4j but for observability. We never claimed that we will be Slf4j nor that we will reach their download statistics. I’m pretty sure that vast majority of applications are doing logging. Not all of the applications are gathering observability data. BTW if you compare the same statistics that you mentioned between micrometer-core library and e.g. opentelemetry-api then you’ll get around 1 800 for Micrometer Core (1.12.0) and 220 for opentelemetry-api (1.32.0).
Micrometer has an OTLP MeterRegistry so it can export metrics in the OTLP format. You can check the code here.
I don’t understand this point. Can you please elaborate?
I don’t understand this point. Can you please elaborate? |
Thanks for your comments.
I don't see in that API how do I create an histogram or a counter. Can you explain?
Slf4j made one API hence most adopted, for logging. It will be wonderful to have same for metrics, in the industry.
In OTel, when creating a Counter for example do it under a Instrumentation Scope, which has a name an a version. So if different plugins use same metric name, it will collide. In OTel each counter created under it own scope. Something like
In OTel the data structure is something like:
Storage is per type. for Count is may end up be:
From my understanding, in MicroMeter every attributes in an instrument is standing on its own. |
Search before asking
Motivation
I'm a co-maintainer of Spring Cloud Sleuth and Micrometer projects (together with @shakuzen and @jonatan-ivanov).
Micrometer Observation is part of the Micrometer 1.10 release and Micrometer Tracing is a new project. The idea of Micrometer Observation is that you instrument code once but you get multiple benefits out of it - e.g. you can get tracing, metrics, logging or whatever you see fit).
I was curious if there's interest in adding Micrometer Observation support so that except for metrics, spans could be created and tracing context propagation could happen too. Via Micrometer Tracing one can use OpenTelemetry or OpenZipkin Brave Tracer, but with the handler mechanism the possibilities are endless :)
Solution
If there's such interest we could provide a PR to add support for observability with Micrometer Observation.
Alternatives
There's none as far as I see
Anything else?
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: