You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/micrometer.adoc
+30Lines changed: 30 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -119,3 +119,33 @@ The `record` property in both observation contexts contains the `ConsumerRecord`
119
119
The sender and receiver contexts `remoteServiceName` properties are set to the Kafka `clusterId` property; this is retrieved by a `KafkaAdmin`.
120
120
If, for some reason - perhaps lack of admin permissions, you cannot retrieve the cluster id, starting with version 3.1, you can set a manual `clusterId` on the `KafkaAdmin` and inject it into ``KafkaTemplate``s and listener containers.
121
121
When it is `null` (default), the admin will invoke the `describeCluster` admin operation to retrieve it from the broker.
122
+
123
+
[[batch-listener-obs]]
124
+
=== Batch Listener Observations
125
+
126
+
When using a batch listener, by default, no observations are created, even if a
127
+
`ObservationRegistry` is present.
128
+
This is because the scope of an observation is tied to the thread, and with a batch
129
+
listener, there is no one-to-one mapping between an observation and a record.
130
+
131
+
To enable per-record observations in a batch listener, set the container factory
0 commit comments