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_COMPATIBLE_METHOD |
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() |
ConstructorInterceptPoint[] |
getConstructorsInterceptPoints() |
InstanceMethodsInterceptPoint[] |
getInstanceMethodsInterceptPoints() |
witnessClassesgetStaticMethodsInterceptPointsenhancedefine, isBootstrapInstrumentationpublic 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_COMPATIBLE_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
public ConstructorInterceptPoint[] getConstructorsInterceptPoints()
getConstructorsInterceptPoints in class AbstractClassEnhancePluginDefinepublic InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints()
getInstanceMethodsInterceptPoints in class AbstractClassEnhancePluginDefineprotected ClassMatch enhanceClass()
enhanceClass in class AbstractClassEnhancePluginDefineCopyright © 2020 The Apache Software Foundation. All rights reserved.