Skip to content
Ameen Abozaid
Planned lessonMID-047-L07

Custom metrics with Micrometer

  • Lesson 7 of 9
  • Mid-level
On This Lesson 4 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

expose business metrics.

Planned topics

  • Micrometer is Spring's metrics facade; Prometheus scrapes the output.
  • Counter (orders placed), timer (checkout duration), gauge (queue size).
  • Name by meaning: shop.orders.placed, tag by result and channel.
  • High-cardinality labels (customer id) can overload the metrics backend.
Draft outline details

Demonstration

java
Counter.builder("shop.orders").tag("result", "placed").register(registry).increment();

Check your understanding

Why not tag a metric with order id?

Show answer

Millions of series overload the backend.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.