R - the subtype of ConnectRecord on which this transformation will operatepublic class ActivateTracingSpan<R extends org.apache.kafka.connect.connector.ConnectRecord<R>> extends Object implements org.apache.kafka.connect.transforms.Transformation<R>
after block
and when found it extracts the parent span from it.EventDispatcher} for example of such implementation| Modifier and Type | Field and Description |
|---|---|
private static String |
DB_FIELDS_PREFIX |
private static String |
DEFAULT_TRACING_OPERATION_NAME |
private static String |
DEFAULT_TRACING_SPAN_CONTEXT_FIELD |
private static org.slf4j.Logger |
LOGGER |
private String |
operationName |
private boolean |
requireContextField |
private SmtManager<R> |
smtManager |
private String |
spanContextField |
private static String |
TRACING_COMPONENT |
static Field |
TRACING_CONTEXT_FIELD_REQUIRED |
static Field |
TRACING_OPERATION_NAME |
static Field |
TRACING_SPAN_CONTEXT_FIELD |
private static String |
TX_LOG_WRITE_OPERATION_NAME |
| Constructor and Description |
|---|
ActivateTracingSpan() |
| Modifier and Type | Method and Description |
|---|---|
private void |
addFieldToSpan(io.opentracing.Tracer.SpanBuilder span,
org.apache.kafka.connect.data.Struct struct,
String field,
String prefix) |
R |
apply(R record) |
void |
close() |
org.apache.kafka.common.config.ConfigDef |
config() |
void |
configure(Map<String,?> props) |
void |
setRequireContextField(boolean requireContextField) |
private R |
traceRecord(R record,
org.apache.kafka.connect.data.Struct envelope,
org.apache.kafka.connect.data.Struct source,
org.apache.kafka.connect.data.Struct after,
String propagatedSpanContext) |
private static final String DB_FIELDS_PREFIX
private static final org.slf4j.Logger LOGGER
private static final String DEFAULT_TRACING_SPAN_CONTEXT_FIELD
private static final String DEFAULT_TRACING_OPERATION_NAME
private static final String TRACING_COMPONENT
private static final String TX_LOG_WRITE_OPERATION_NAME
public static final Field TRACING_SPAN_CONTEXT_FIELD
public static final Field TRACING_OPERATION_NAME
public static final Field TRACING_CONTEXT_FIELD_REQUIRED
private String spanContextField
private String operationName
private boolean requireContextField
private SmtManager<R extends org.apache.kafka.connect.connector.ConnectRecord<R>> smtManager
public void configure(Map<String,?> props)
configure in interface org.apache.kafka.common.Configurablepublic void setRequireContextField(boolean requireContextField)
private R traceRecord(R record, org.apache.kafka.connect.data.Struct envelope, org.apache.kafka.connect.data.Struct source, org.apache.kafka.connect.data.Struct after, String propagatedSpanContext)
public void close()
public org.apache.kafka.common.config.ConfigDef config()
Copyright © 2021 JBoss by Red Hat. All rights reserved.