Class PulsarProducerInterceptor
java.lang.Object
org.apache.skywalking.apm.plugin.pulsar.common.PulsarProducerInterceptor
- All Implemented Interfaces:
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
public class PulsarProducerInterceptor
extends Object
implements org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
Interceptor for pulsar producer enhanced instance.
Here is the intercept process steps:
1. Record the service url, topic name through this(ProducerImpl) 2. Create the exit span when the producer invokesendAsyncmethod 3. Inject the context toMessage.getProperties()4. CreateSendCallbackEnhanceRequiredInfowithContextManager.capture()and set the callback enhanced instance skywalking dynamic field to the created required info. 5. Stop the exit span whensendAsyncmethod finished.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionafterMethod(org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Object ret) voidbeforeMethod(org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult result) voidhandleMethodException(org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Throwable t)
-
Field Details
-
OPERATE_NAME_PREFIX
- See Also:
-
PRODUCER_OPERATE_NAME_SUFFIX
- See Also:
-
-
Constructor Details
-
PulsarProducerInterceptor
public PulsarProducerInterceptor()
-
-
Method Details
-
beforeMethod
public void beforeMethod(org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult result) throws Throwable - Specified by:
beforeMethodin interfaceorg.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor- Throws:
Throwable
-
afterMethod
public Object afterMethod(org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Object ret) throws Throwable - Specified by:
afterMethodin interfaceorg.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor- Throws:
Throwable
-
handleMethodException
public void handleMethodException(org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Throwable t) - Specified by:
handleMethodExceptionin interfaceorg.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
-