Add observation to inbound endpoints (#3930)
* Add observation to inbound endpoints * * Improve `Observation` logic in the `MessageProducerSupport` and `MessagingGatewaySupport` * Clean up Javadocs in observation support classes * Add test for `MessagingGatewaySupport` instrumentation into `IntegrationObservabilityZipkinTests` * Add docs for `@EnableIntegrationManagement.observationPatterns()` * The generated docs for metrics and spans looks OK: have both `Gateway` and `Handler` section now * * Fix Checkstyle violations * * Fix `IntegrationMBeanExporter` to filter out a `MessageProducer` from sources. Marking a `MessageProducerSupport` with an `IntegrationInboundManagement` causes it to be considered as a source for JMX. Technically it might have a reason since it is indeed a source, but that's fully different story * * No observation instrumentation by default * * Fix "no observation by default" configuration logic
This commit is contained in:
@@ -26,6 +26,7 @@ import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.lang.model.SourceVersion;
|
||||
@@ -268,6 +269,7 @@ public class IntegrationMBeanExporter extends MBeanExporter
|
||||
.stream()
|
||||
// If the source is proxied, we have to extract the target to expose as an MBean.
|
||||
// The MetadataMBeanInfoAssembler does not support JDK dynamic proxies.
|
||||
.filter(Predicate.not(MessageProducer.class::isInstance))
|
||||
.map(this::extractTarget)
|
||||
.map(IntegrationInboundManagement.class::cast)
|
||||
.forEach(src -> this.sources.put(src.getComponentName(), src));
|
||||
|
||||
Reference in New Issue
Block a user