Class ModuleObservabilityBeanPostProcessor
java.lang.Object
org.springframework.modulith.observability.support.ModuleObservabilitySupport
org.springframework.modulith.observability.support.ModuleObservabilityBeanPostProcessor
- All Implemented Interfaces:
Aware
,BeanFactoryAware
,BeanPostProcessor
,Ordered
public class ModuleObservabilityBeanPostProcessor
extends ModuleObservabilitySupport
implements BeanPostProcessor, Ordered
A
BeanPostProcessor
that decorates beans exposed by application modules with an interceptor that registers
module entry and exit to create tracing spans for those invocations.- Author:
- Oliver Drotbohm
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
-
Field Summary
FieldsFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorsConstructorDescriptionModuleObservabilityBeanPostProcessor
(ApplicationModulesRuntime runtime, Supplier<io.micrometer.observation.ObservationRegistry> observationRegistry, ConfigurableListableBeanFactory factory, Environment environment) Creates a newModuleObservabilityBeanPostProcessor
for the givenApplicationModulesRuntime
andObservationRegistry
. -
Method Summary
Modifier and TypeMethodDescriptionint
getOrder()
postProcessAfterInitialization
(Object bean, String beanName) Methods inherited from class org.springframework.modulith.observability.support.ModuleObservabilitySupport
addAdvisor, addAdvisor, setBeanFactory
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.beans.factory.config.BeanPostProcessor
postProcessBeforeInitialization
-
Field Details
-
MODULE_BAGGAGE_KEY
- See Also:
-
-
Constructor Details
-
ModuleObservabilityBeanPostProcessor
public ModuleObservabilityBeanPostProcessor(ApplicationModulesRuntime runtime, Supplier<io.micrometer.observation.ObservationRegistry> observationRegistry, ConfigurableListableBeanFactory factory, Environment environment) Creates a newModuleObservabilityBeanPostProcessor
for the givenApplicationModulesRuntime
andObservationRegistry
.- Parameters:
runtime
- must not be null.observationRegistry
- must not be null.factory
- must not be null.environment
- must not be null.
-
-
Method Details
-
getOrder
public int getOrder() -
postProcessAfterInitialization
- Specified by:
postProcessAfterInitialization
in interfaceBeanPostProcessor
- Throws:
BeansException
-