Class AbstractProcessorComponent
- java.lang.Object
-
- com.avioconsulting.mule.opentelemetry.internal.processor.AbstractProcessorComponent
-
- All Implemented Interfaces:
ProcessorComponent
- Direct Known Subclasses:
AnypointMQProcessorComponent,APIKitProcessorComponent,DBProcessorComponent,FlowProcessorComponent,GenericProcessorComponent,HttpProcessorComponent,MuleCoreProcessorComponent
public abstract class AbstractProcessorComponent extends Object implements ProcessorComponent
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAbstractProcessorComponent.ContextMapGetter
-
Field Summary
Fields Modifier and Type Field Description protected org.mule.runtime.api.component.location.ConfigurationComponentLocatorconfigurationComponentLocatorstatic StringFLOWstatic StringNAMESPACE_MULE
-
Constructor Summary
Constructors Constructor Description AbstractProcessorComponent()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddTagIfPresent(Map<String,String> sourceMap, String sourceKey, Map<String,String> targetMap, String targetKey)booleancanHandle(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier)protected <A> Map<String,String>getAttributes(org.mule.runtime.api.component.Component component, org.mule.runtime.api.metadata.TypedValue<A> attributes)protected TraceComponentgetBaseTraceComponent(org.mule.runtime.api.notification.EnrichedServerNotification notification)protected StringgetDefaultSpanName(Map<String,String> tags)TraceComponentgetEndTraceComponent(org.mule.runtime.api.notification.EnrichedServerNotification notification)Build aTraceComponentfor end of a flow-like container or a message processor.protected abstract StringgetNamespace()protected abstract List<String>getOperations()protected Map<String,String>getProcessorCommonTags(org.mule.runtime.api.component.Component component)protected Optional<org.mule.runtime.api.component.Component>getSourceComponent(org.mule.runtime.api.notification.EnrichedServerNotification notification)protected org.mule.runtime.api.component.ComponentIdentifiergetSourceIdentifier(org.mule.runtime.api.notification.EnrichedServerNotification notification)protected abstract List<String>getSources()protected io.opentelemetry.api.trace.SpanKindgetSpanKind()TraceComponentgetStartTraceComponent(org.mule.runtime.api.component.Component component, org.mule.runtime.api.message.Message message, String correlationId)Create a start trace component without the notification object.TraceComponentgetStartTraceComponent(org.mule.runtime.api.notification.EnrichedServerNotification notification)Build aTraceComponentfor start of a flow-like container or a message processor.protected TraceComponentgetTraceComponentBuilderFor(org.mule.runtime.api.notification.EnrichedServerNotification notification)protected StringgetTransactionId(org.mule.runtime.api.notification.EnrichedServerNotification notification)protected booleannamespaceSupported(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier)protected booleanoperationSupported(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier)protected booleansourceSupported(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier)ProcessorComponentwithConfigurationComponentLocator(org.mule.runtime.api.component.location.ConfigurationComponentLocator configurationComponentLocator)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.avioconsulting.mule.opentelemetry.api.processor.ProcessorComponent
getSourceEndTraceComponent, getSourceStartTraceComponent
-
-
-
-
Field Detail
-
NAMESPACE_MULE
public static final String NAMESPACE_MULE
- See Also:
- Constant Field Values
-
FLOW
public static final String FLOW
- See Also:
- Constant Field Values
-
configurationComponentLocator
protected org.mule.runtime.api.component.location.ConfigurationComponentLocator configurationComponentLocator
-
-
Method Detail
-
withConfigurationComponentLocator
public ProcessorComponent withConfigurationComponentLocator(org.mule.runtime.api.component.location.ConfigurationComponentLocator configurationComponentLocator)
- Specified by:
withConfigurationComponentLocatorin interfaceProcessorComponent
-
getNamespace
protected abstract String getNamespace()
-
getSpanKind
protected io.opentelemetry.api.trace.SpanKind getSpanKind()
-
canHandle
public boolean canHandle(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier)
- Specified by:
canHandlein interfaceProcessorComponent
-
namespaceSupported
protected boolean namespaceSupported(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier)
-
operationSupported
protected boolean operationSupported(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier)
-
sourceSupported
protected boolean sourceSupported(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier)
-
getEndTraceComponent
public TraceComponent getEndTraceComponent(org.mule.runtime.api.notification.EnrichedServerNotification notification)
Description copied from interface:ProcessorComponentBuild aTraceComponentfor end of a flow-like container or a message processor. This may need light processing compared toProcessorComponent.getStartTraceComponent(EnrichedServerNotification).- Specified by:
getEndTraceComponentin interfaceProcessorComponent- Parameters:
notification-EnrichedServerNotification- Returns:
TraceComponent
-
getTraceComponentBuilderFor
protected TraceComponent getTraceComponentBuilderFor(org.mule.runtime.api.notification.EnrichedServerNotification notification)
-
getBaseTraceComponent
protected TraceComponent getBaseTraceComponent(org.mule.runtime.api.notification.EnrichedServerNotification notification)
-
getTransactionId
protected String getTransactionId(org.mule.runtime.api.notification.EnrichedServerNotification notification)
-
getProcessorCommonTags
protected Map<String,String> getProcessorCommonTags(org.mule.runtime.api.component.Component component)
-
getSourceIdentifier
protected org.mule.runtime.api.component.ComponentIdentifier getSourceIdentifier(org.mule.runtime.api.notification.EnrichedServerNotification notification)
-
getAttributes
protected <A> Map<String,String> getAttributes(org.mule.runtime.api.component.Component component, org.mule.runtime.api.metadata.TypedValue<A> attributes)
-
getStartTraceComponent
public TraceComponent getStartTraceComponent(org.mule.runtime.api.notification.EnrichedServerNotification notification)
Description copied from interface:ProcessorComponentBuild aTraceComponentfor start of a flow-like container or a message processor.- Specified by:
getStartTraceComponentin interfaceProcessorComponent- Parameters:
notification-EnrichedServerNotification- Returns:
TraceComponent
-
getStartTraceComponent
public TraceComponent getStartTraceComponent(org.mule.runtime.api.component.Component component, org.mule.runtime.api.message.Message message, String correlationId)
Create a start trace component without the notification object. This is mostly consumed by interceptors.- Specified by:
getStartTraceComponentin interfaceProcessorComponent- Parameters:
component-Componentmessage-MessagecorrelationId-String- Returns:
- TraceComponent
-
addTagIfPresent
protected void addTagIfPresent(Map<String,String> sourceMap, String sourceKey, Map<String,String> targetMap, String targetKey)
-
getSourceComponent
protected Optional<org.mule.runtime.api.component.Component> getSourceComponent(org.mule.runtime.api.notification.EnrichedServerNotification notification)
-
-