public class KafkaProducerInstrumentation extends AbstractKafkaInstrumentation
1. Record the broker address when the client create theorg.apache.kafka.clients.producer.KafkaProducerinstance 2. Create the exit span when the client invokesendmethod 3. Inject the context toProducerRecord.headers3. Stop the exit span whensendmethod finished.
| Modifier and Type | Field and Description |
|---|---|
static String |
CONSTRUCTOR_INTERCEPTOR_CLASS |
static String |
CONSTRUCTOR_INTERCEPTOR_FLAG |
static String |
ENHANCE_CLASS |
static String |
INTERCEPTOR_CLASS |
CONTEXT_ATTR_NAME| Constructor and Description |
|---|
KafkaProducerInstrumentation() |
| Modifier and Type | Method and Description |
|---|---|
protected ClassMatch |
enhanceClass() |
protected ConstructorInterceptPoint[] |
getConstructorsInterceptPoints() |
protected InstanceMethodsInterceptPoint[] |
getInstanceMethodsInterceptPoints() |
witnessClassesgetStaticMethodsInterceptPointsenhancedefinepublic static final String INTERCEPTOR_CLASS
public static final String ENHANCE_CLASS
public static final String CONSTRUCTOR_INTERCEPTOR_CLASS
public static final String CONSTRUCTOR_INTERCEPTOR_FLAG
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.