Skip to content

Commit 82a57ab

Browse files
committed
Polish Micrometer Observation documentation
References #379
1 parent e21e4f2 commit 82a57ab

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/docs/asciidoc/appendixes.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ ifndef::build-directory[:build-directory: ../../../target]
77
It is possible to use https://micrometer.io/docs/observation[Micrometer Observation] to instrument publishing and consuming in the stream Java client.
88
Micrometer Observation provides https://spring.io/blog/2022/10/12/observability-with-spring-boot-3[metrics, tracing, and log correlation with one single API].
99

10-
The following snippet shows how to create and set up the Micrometer `ObservationCollector` from an existing `ObservationRegistry`:
10+
The stream Java client provides an `ObservationCollector` abstraction and an implementation for Micrometer Observation.
11+
The following snippet shows how to create and set up the Micrometer `ObservationCollector` implementation with an existing `ObservationRegistry`:
1112

1213
.Configuring Micrometer Observation
1314
[source,java,indent=0]
1415
--------
1516
include::{test-examples}/EnvironmentUsage.java[tag=micrometer-observation]
1617
--------
17-
<1> Create the Micrometer `ObservationCollector`
18+
<1> Configure Micrometer `ObservationCollector` with builder
19+
<2> Set Micrometer `ObservationRegistry`
1820

1921
The next sections document the conventions, spans, and metrics made available by the instrumentation.
2022
They are automatically generated from the source code with the https://github.com/micrometer-metrics/micrometer-docs-generator[Micrometer documentation generator].

src/test/java/com/rabbitmq/stream/docs/EnvironmentUsage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ void micrometerObservation() {
154154
// tag::micrometer-observation[]
155155
Environment environment = Environment.builder()
156156
.observationCollector(new MicrometerObservationCollectorBuilder() // <1>
157-
.registry(observationRegistry).build()) // <1>
157+
.registry(observationRegistry).build()) // <2>
158158
.build();
159159
// end::micrometer-observation[]
160160
}

0 commit comments

Comments
 (0)