|
@@ -16,7 +16,7 @@ import { DomainEventFactory } from '../Domain/Event/DomainEventFactory'
|
|
|
import {
|
|
|
SNSDomainEventPublisher,
|
|
|
SQSDomainEventSubscriberFactory,
|
|
|
- SQSEventMessageHandler,
|
|
|
+ SQSOpenTelemetryEventMessageHandler,
|
|
|
} from '@standardnotes/domain-events-infra'
|
|
|
import { Timer, TimerInterface } from '@standardnotes/time'
|
|
|
import { PredicateRepositoryInterface } from '../Domain/Predicate/PredicateRepositoryInterface'
|
|
@@ -34,6 +34,7 @@ import { VerifyPredicates } from '../Domain/UseCase/VerifyPredicates/VerifyPredi
|
|
|
import { UserRegisteredEventHandler } from '../Domain/Handler/UserRegisteredEventHandler'
|
|
|
import { SubscriptionCancelledEventHandler } from '../Domain/Handler/SubscriptionCancelledEventHandler'
|
|
|
import { ExitDiscountAppliedEventHandler } from '../Domain/Handler/ExitDiscountAppliedEventHandler'
|
|
|
+import { ServiceIdentifier } from '@standardnotes/domain-core'
|
|
|
|
|
|
export class ContainerConfigLoader {
|
|
|
async load(): Promise<Container> {
|
|
@@ -153,7 +154,13 @@ export class ContainerConfigLoader {
|
|
|
|
|
|
container
|
|
|
.bind<DomainEventMessageHandlerInterface>(TYPES.DomainEventMessageHandler)
|
|
|
- .toConstantValue(new SQSEventMessageHandler(eventHandlers, container.get(TYPES.Logger)))
|
|
|
+ .toConstantValue(
|
|
|
+ new SQSOpenTelemetryEventMessageHandler(
|
|
|
+ ServiceIdentifier.NAMES.SchedulerWorker,
|
|
|
+ eventHandlers,
|
|
|
+ container.get(TYPES.Logger),
|
|
|
+ ),
|
|
|
+ )
|
|
|
container
|
|
|
.bind<DomainEventSubscriberFactoryInterface>(TYPES.DomainEventSubscriberFactory)
|
|
|
.toConstantValue(
|