Skip to content
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

Make more explicit that recording a metric is safe to call #5365

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* xref:installing.adoc[Installing]
* xref:concepts.adoc[Concepts]
** xref:concepts/implementations.adoc[Supported Monitoring Systems]
** xref:concepts/registry.adoc[Registry]
** xref:concepts/meters.adoc[Meters]
** xref:concepts/registry.adoc[Registry]
** xref:concepts/naming.adoc[Naming Meters]
** xref:concepts/meter-filters.adoc[Meter Filters]
** xref:concepts/rate-aggregation.adoc[Rate Aggregation]
Expand Down
5 changes: 5 additions & 0 deletions docs/modules/ROOT/pages/concepts/meters.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
[[meters]]
= Meters

A `Meter` is the interface for collecting a set of measurements (which we individually call metrics) about your application.

Micrometer supports a set of `Meter` primitives, including `Timer`, `Counter`, `Gauge`, `DistributionSummary`, `LongTaskTimer`, `FunctionCounter`, `FunctionTimer`, and `TimeGauge`. Different meter types result in a different number of time series metrics. For example, while there is a single metric that represents a `Gauge`, a `Timer` measures both the count of timed events and the total time of all timed events.

TIP: Recording a measurement for a `Meter` is expected to be a relatively cheap operation and should not throw any exception.
If the xref:./registry.adoc[registry] supports publishing metrics to a monitoring system, this is done in a separate thread snd should not affect recording metrics.

A meter is uniquely identified by its name and dimensions. We use the terms, "`dimensions`" and "`tags,`" interchangeably, and the Micrometer interface is `Tag` simply because it is shorter. As a general rule, it should be possible to use the name as a pivot. Dimensions let a particular named metric be sliced to drill down and reason about the data. This means that, if only the name is selected, you can drill down by using other dimensions and reason about the value being shown.
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/concepts/registry.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[registry]]
= Registry

A `Meter` is the interface for collecting a set of measurements (which we individually call metrics) about your application. Meters in Micrometer are created from and held in a `MeterRegistry`. Each supported monitoring system has an implementation of `MeterRegistry`. How a registry is created varies for each implementation.
Meters in Micrometer are created from and held in a `MeterRegistry`. Each supported monitoring system has an implementation of `MeterRegistry`. How a registry is created varies for each implementation.

Micrometer includes a `SimpleMeterRegistry` that holds the latest value of each meter in memory and does not export the data anywhere. If you do not yet have a preferred monitoring system, you can get started playing with metrics by using the simple registry:

Expand Down