Class KafkaRecordReceiverContext
java.lang.Object
io.micrometer.observation.Observation.Context
io.micrometer.observation.transport.ReceiverContext<org.apache.kafka.clients.consumer.ConsumerRecord<?,?>>
org.springframework.kafka.support.micrometer.KafkaRecordReceiverContext
- All Implemented Interfaces:
io.micrometer.observation.Observation.ContextView
public class KafkaRecordReceiverContext
extends io.micrometer.observation.transport.ReceiverContext<org.apache.kafka.clients.consumer.ConsumerRecord<?,?>>
ReceiverContext
for ConsumerRecord
s.- Since:
- 3.0
-
Constructor Summary
ConstructorDescriptionKafkaRecordReceiverContext
(org.apache.kafka.clients.consumer.ConsumerRecord<?, ?> record, String listenerId, Supplier<String> clusterId) -
Method Summary
Modifier and TypeMethodDescriptionReturn the listener id.org.apache.kafka.clients.consumer.ConsumerRecord<?,
?> Return the consumer record.Return the source topic.Methods inherited from class io.micrometer.observation.transport.ReceiverContext
getCarrier, getGetter, getKind, getRemoteServiceAddress, getRemoteServiceName, setCarrier, setRemoteServiceAddress, setRemoteServiceName
Methods inherited from class io.micrometer.observation.Observation.Context
addHighCardinalityKeyValue, addHighCardinalityKeyValues, addLowCardinalityKeyValue, addLowCardinalityKeyValues, clear, computeIfAbsent, containsKey, get, getAllKeyValues, getContextualName, getError, getHighCardinalityKeyValue, getHighCardinalityKeyValues, getLowCardinalityKeyValue, getLowCardinalityKeyValues, getName, getOrDefault, getParentObservation, getRequired, put, remove, removeHighCardinalityKeyValue, removeHighCardinalityKeyValues, removeLowCardinalityKeyValue, removeLowCardinalityKeyValues, setContextualName, setError, setName, setParentObservation, toString
-
Constructor Details
-
KafkaRecordReceiverContext
-
-
Method Details
-
getListenerId
Return the listener id.- Returns:
- the listener id.
-
getSource
Return the source topic.- Returns:
- the source.
-
getRecord
public org.apache.kafka.clients.consumer.ConsumerRecord<?,?> getRecord()Return the consumer record.- Returns:
- the record the record.
- Since:
- 3.0.6
-