public class KafkaConsumerInstrumentation extends AbstractKafkaInstrumentation
1. Record the topic when the client invokesubscribedmethod 2. Create the entry span when the client invoke the methodpollOnce. 3. Extract all theTrace Contextby iterate allConsumerRecord4. Stop the entry span whenpollOncemethod finished.
| Modifier and Type | Field and Description |
|---|---|
static String |
CONSTRUCTOR_INTERCEPT_TYPE |
static String |
CONSTRUCTOR_INTERCEPTOR_CLASS |
static String |
ENHANCE_CLASS |
static String |
ENHANCE_METHOD |
static String |
INTERCEPTOR_CLASS |
static String |
SUBSCRIBE_INTERCEPT_CLASS |
static String |
SUBSCRIBE_INTERCEPT_TYPE |
static String |
SUBSCRIBE_METHOD |
CONTEXT_ATTR_NAME| Constructor and Description |
|---|
KafkaConsumerInstrumentation() |
| Modifier and Type | Method and Description |
|---|---|
protected ClassMatch |
enhanceClass() |
protected ConstructorInterceptPoint[] |
getConstructorsInterceptPoints() |
protected InstanceMethodsInterceptPoint[] |
getInstanceMethodsInterceptPoints() |
witnessClassesgetStaticMethodsInterceptPointsenhancedefinepublic static final String CONSTRUCTOR_INTERCEPT_TYPE
public static final String CONSTRUCTOR_INTERCEPTOR_CLASS
public static final String INTERCEPTOR_CLASS
public static final String ENHANCE_METHOD
public static final String ENHANCE_CLASS
public static final String SUBSCRIBE_METHOD
public static final String SUBSCRIBE_INTERCEPT_TYPE
public static final String SUBSCRIBE_INTERCEPT_CLASS
protected ConstructorInterceptPoint[] getConstructorsInterceptPoints()
getConstructorsInterceptPoints in class ClassEnhancePluginDefineprotected InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints()
getInstanceMethodsInterceptPoints in class ClassEnhancePluginDefineprotected ClassMatch enhanceClass()
enhanceClass in class AbstractClassEnhancePluginDefineCopyright © 2019 The Apache Software Foundation. All rights reserved.