public interface ObservationCollector<T>
Implementations can gather information and send it to tracing backends. This allows e.g. following the processing steps of a given message through different systems.
This is considered an SPI and is susceptible to change at any time.
EnvironmentBuilder.observationCollector(ObservationCollector),
MicrometerObservationCollectorBuilder| Modifier and Type | Field and Description |
|---|---|
static ObservationCollector<Void> |
NO_OP |
| Modifier and Type | Method and Description |
|---|---|
default boolean |
isNoop()
Says whether the implementation does nothing or not.
|
T |
prePublish(String stream,
Message message)
Start observation.
|
void |
published(T context,
Message message)
Callback when the message is about to be published.
|
MessageHandler |
subscribe(MessageHandler handler)
Decorate consumer registration.
|
static final ObservationCollector<Void> NO_OP
T prePublish(String stream, Message message)
Implementations are expecting to return an observation context that will be passed in to the
published(Object, Message) callback.
stream - the stream to publish tomessage - the message to publishvoid published(T context, Message message)
context - the observation contextmessage - the message to publishMessageHandler subscribe(MessageHandler handler)
handler - the original handlerdefault boolean isNoop()
Copyright © 2024 Broadcom Inc. and/or its subsidiaries. All rights reserved.