Skip to content

Commit

Permalink
Enhance micrometer documentation with new customization options
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand committed Jul 7, 2023
1 parent fbd6e52 commit d00452f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion docs/src/main/asciidoc/telemetry-micrometer.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,12 @@ For example, setting
By default, the metrics are exported using the Prometheus format `application/openmetrics-text`,
you can revert to the former format by specifying the `Accept` request header to `text/plain` (`curl -H "Accept: text/plain" localhost:8080/q/metrics/`).

Check warning on line 520 in docs/src/main/asciidoc/telemetry-micrometer.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Headings] Use sentence-style capitalization in 'Customizing Micrometer'. Raw Output: {"message": "[Quarkus.Headings] Use sentence-style capitalization in 'Customizing Micrometer'.", "location": {"path": "docs/src/main/asciidoc/telemetry-micrometer.adoc", "range": {"start": {"line": 520, "column": 126}}}, "severity": "INFO"}

== Customizing Micrometer

Quarkus provides a variety of way to customize Micrometer.

[[meter-filter]]
== Use `MeterFilter` to customize emitted tags and metrics
=== Use `MeterFilter` to customize emitted tags and metrics

Micrometer uses `MeterFilter` instances to customize the metrics emitted by `MeterRegistry` instances.
The Micrometer extension will detect `MeterFilter` CDI beans and use them when initializing `MeterRegistry`
Expand Down Expand Up @@ -580,6 +584,15 @@ An application configuration property is also injected and used as a tag value.
Additional examples of MeterFilters can be found in the
link:https://micrometer.io/docs/concepts[official documentation].

=== Use `HttpServerMetricsTagsContributor` for server HTTP requests

By providing CDI beans that implement `io.quarkus.micrometer.runtime.HttpServerMetricsTagsContributor`, user code can contribute arbitrary tags based on the details of HTTP request

=== Use `MeterRegistryCustomizer` for arbitrary customizations to meter registries

By providing CDI beans that implement `io.quarkus.micrometer.runtime.MeterRegistryCustomizer` user code has the change to change the configuration of any `MeterRegistry` that has been activated.
Unless an implementation is annotated with `@io.quarkus.micrometer.runtime.MeterRegistryCustomizerConstraint`, the customization applies to all `MeterRegistry` instances.

Check warning on line 594 in docs/src/main/asciidoc/telemetry-micrometer.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Headings] Use sentence-style capitalization in 'Does Micrometer support annotations?'. Raw Output: {"message": "[Quarkus.Headings] Use sentence-style capitalization in 'Does Micrometer support annotations?'.", "location": {"path": "docs/src/main/asciidoc/telemetry-micrometer.adoc", "range": {"start": {"line": 594, "column": 159}}}, "severity": "INFO"}

[[annotations]]
== Does Micrometer support annotations?

Check warning on line 597 in docs/src/main/asciidoc/telemetry-micrometer.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.HeadingPunctuation] Do not use end punctuation in headings. Raw Output: {"message": "[Quarkus.HeadingPunctuation] Do not use end punctuation in headings.", "location": {"path": "docs/src/main/asciidoc/telemetry-micrometer.adoc", "range": {"start": {"line": 597, "column": 5}}}, "severity": "INFO"}

Expand Down

0 comments on commit d00452f

Please sign in to comment.