Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass through missing span factories #232

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.axonframework.commandhandling.distributed.RoutingStrategy;
import org.axonframework.common.transaction.TransactionManager;
import org.axonframework.config.Configuration;
import org.axonframework.eventhandling.EventBusSpanFactory;
import org.axonframework.extensions.multitenancy.components.TenantConnectPredicate;
import org.axonframework.extensions.multitenancy.components.TenantDescriptor;
import org.axonframework.extensions.multitenancy.components.TenantEventProcessorControlSegmentFactory;
Expand Down Expand Up @@ -130,6 +131,7 @@ public TenantCommandSegmentFactory tenantAxonServerCommandSegmentFactory(
.routingStrategy(routingStrategy)
.priorityCalculator(priorityCalculator)
.loadFactorProvider(loadFactorProvider)
.spanFactory(axonConfiguration.getComponent(CommandBusSpanFactory.class))
.targetContextResolver(targetContextResolver)
.axonServerConnectionManager(connectionManager)
.configuration(axonServerConfig)
Expand Down Expand Up @@ -163,6 +165,7 @@ public TenantQuerySegmentFactory tenantAxonServerQuerySegmentFactory(
QueryBus.class, "queryBus@" + tenantDescriptor
))
.transactionManager(txManager)
.spanFactory(config.getComponent(QueryBusSpanFactory.class))
.queryUpdateEmitter(multiTenantQueryUpdateEmitter)
.errorHandler(queryInvocationErrorHandler)
.build();
Expand All @@ -183,6 +186,7 @@ public TenantQuerySegmentFactory tenantAxonServerQuerySegmentFactory(
.messageSerializer(messageSerializer)
.genericSerializer(genericSerializer)
.priorityCalculator(priorityCalculator)
.spanFactory(config.getComponent(QueryBusSpanFactory.class))
.targetContextResolver(targetContextResolver)
.defaultContext(tenantDescriptor.tenantId())
.build();
Expand Down Expand Up @@ -224,6 +228,7 @@ public TenantEventSegmentFactory tenantEventSegmentFactory(AxonServerConfigurati
.platformConnectionManager(axonServerConnectionManager)
.snapshotSerializer(snapshotSerializer)
.eventSerializer(eventSerializer)
.spanFactory(config.getComponent(EventBusSpanFactory.class))
.defaultContext(tenant.tenantId())
.snapshotFilter(config.snapshotFilter())
.upcasterChain(config.upcasterChain())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,7 @@
import org.axonframework.config.Configuration;
import org.axonframework.config.EventProcessingConfigurer;
import org.axonframework.config.EventProcessingModule;
import org.axonframework.eventhandling.DirectEventProcessingStrategy;
import org.axonframework.eventhandling.EventHandlerInvoker;
import org.axonframework.eventhandling.EventMessage;
import org.axonframework.eventhandling.EventProcessor;
import org.axonframework.eventhandling.SubscribingEventProcessor;
import org.axonframework.eventhandling.TrackedEventMessage;
import org.axonframework.eventhandling.TrackingEventProcessor;
import org.axonframework.eventhandling.TrackingEventProcessorConfiguration;
import org.axonframework.eventhandling.*;
import org.axonframework.eventhandling.pooled.PooledStreamingEventProcessor;
import org.axonframework.extensions.multitenancy.TenantWrappedTransactionManager;
import org.axonframework.extensions.multitenancy.components.eventstore.MultiTenantSubscribableMessageSource;
Expand Down Expand Up @@ -204,6 +197,7 @@ private SubscribingEventProcessor buildSep(String name, EventHandlerInvoker even
.rollbackConfiguration(super.rollbackConfiguration(name))
.errorHandler(super.errorHandler(name))
.messageMonitor(super.messageMonitor(SubscribingEventProcessor.class, name))
.spanFactory(super.configuration.getComponent(EventProcessorSpanFactory.class))
.messageSource(source)
.processingStrategy(DirectEventProcessingStrategy.INSTANCE)
.transactionManager(transactionManager)
Expand Down Expand Up @@ -260,6 +254,7 @@ private TrackingEventProcessor buildTep(String name, EventHandlerInvoker eventHa
.rollbackConfiguration(super.rollbackConfiguration(name))
.errorHandler(super.errorHandler(name))
.messageMonitor(super.messageMonitor(TrackingEventProcessor.class, name))
.spanFactory(super.configuration.getComponent(EventProcessorSpanFactory.class))
.messageSource(source)
.tokenStore(super.tokenStore(name))
.transactionManager(transactionManager)
Expand Down Expand Up @@ -339,6 +334,7 @@ private PooledStreamingEventProcessor.Builder psepBuilder(String name, EventHand
.errorHandler(super.errorHandler(name))
.messageMonitor(super.messageMonitor(PooledStreamingEventProcessor.class, name))
.messageSource(source)
.spanFactory(super.configuration.getComponent(EventProcessorSpanFactory.class))
.tokenStore(super.tokenStore(name))
.transactionManager(transactionManager)
.coordinatorExecutor(processorName -> {
Expand Down
Loading