79127329

Date: 2024-10-25 21:20:00
Score: 1
Natty:
Report link

The Observation API by default does not record metrics nor spans. You need to register handlers to record anything. This is the "superpower" of the API, you decide runtime what outputs you want. I recommend watching this talk from beginning to end: https://www.youtube.com/watch?v=Qyku6cR6ADY#t=14m23s

Spring Boot on the other hand registers handlers for you based on your classpath: if micrometer-core is present, it will register DefaultMeterHandler to record metrics, if Micrometer Tracing is on the classpath, it will register tracing handlers.

In order to prevent registration of DefaultMeterHandler, you can do a few things:

Btw why do you want to publish spans but not metrics?

Reasons:
  • Blacklisted phrase (1): youtube.com
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • High reputation (-1):
Posted by: Jonatan Ivanov