fix: disable sqs open telemetry manual tracing in favour of automated instrumentation
This commit is contained in:
parent
0a90502658
commit
337eae73c6
7 changed files with 12 additions and 79 deletions
|
@ -7,7 +7,7 @@ import {
|
|||
DomainEventPublisherInterface,
|
||||
DomainEventSubscriberFactoryInterface,
|
||||
} from '@standardnotes/domain-events'
|
||||
import { MapperInterface, ServiceIdentifier } from '@standardnotes/domain-core'
|
||||
import { MapperInterface } from '@standardnotes/domain-core'
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const Mixpanel = require('mixpanel')
|
||||
|
||||
|
@ -18,7 +18,7 @@ import { DomainEventFactory } from '../Domain/Event/DomainEventFactory'
|
|||
import {
|
||||
SNSOpenTelemetryDomainEventPublisher,
|
||||
SQSDomainEventSubscriberFactory,
|
||||
SQSOpenTelemetryEventMessageHandler,
|
||||
SQSEventMessageHandler,
|
||||
} from '@standardnotes/domain-events-infra'
|
||||
import { Timer, TimerInterface } from '@standardnotes/time'
|
||||
import { PeriodKeyGeneratorInterface } from '../Domain/Time/PeriodKeyGeneratorInterface'
|
||||
|
@ -238,13 +238,7 @@ export class ContainerConfigLoader {
|
|||
|
||||
container
|
||||
.bind<DomainEventMessageHandlerInterface>(TYPES.DomainEventMessageHandler)
|
||||
.toConstantValue(
|
||||
new SQSOpenTelemetryEventMessageHandler(
|
||||
ServiceIdentifier.NAMES.AnalyticsWorker,
|
||||
eventHandlers,
|
||||
container.get(TYPES.Logger),
|
||||
),
|
||||
)
|
||||
.toConstantValue(new SQSEventMessageHandler(eventHandlers, container.get(TYPES.Logger)))
|
||||
container
|
||||
.bind<DomainEventSubscriberFactoryInterface>(TYPES.DomainEventSubscriberFactory)
|
||||
.toConstantValue(
|
||||
|
|
|
@ -92,7 +92,6 @@ import {
|
|||
SNSOpenTelemetryDomainEventPublisher,
|
||||
SQSDomainEventSubscriberFactory,
|
||||
SQSEventMessageHandler,
|
||||
SQSOpenTelemetryEventMessageHandler,
|
||||
} from '@standardnotes/domain-events-infra'
|
||||
import { GetUserSubscription } from '../Domain/UseCase/GetUserSubscription/GetUserSubscription'
|
||||
import { ChangeCredentials } from '../Domain/UseCase/ChangeCredentials/ChangeCredentials'
|
||||
|
@ -189,7 +188,6 @@ import {
|
|||
ControllerContainer,
|
||||
ControllerContainerInterface,
|
||||
MapperInterface,
|
||||
ServiceIdentifier,
|
||||
SharedVaultUser,
|
||||
} from '@standardnotes/domain-core'
|
||||
import { SessionTracePersistenceMapper } from '../Mapping/SessionTracePersistenceMapper'
|
||||
|
@ -1226,15 +1224,7 @@ export class ContainerConfigLoader {
|
|||
} else {
|
||||
container
|
||||
.bind<DomainEventMessageHandlerInterface>(TYPES.Auth_DomainEventMessageHandler)
|
||||
.toConstantValue(
|
||||
isConfiguredForHomeServerOrSelfHosting
|
||||
? new SQSEventMessageHandler(eventHandlers, container.get(TYPES.Auth_Logger))
|
||||
: new SQSOpenTelemetryEventMessageHandler(
|
||||
ServiceIdentifier.NAMES.AuthWorker,
|
||||
eventHandlers,
|
||||
container.get(TYPES.Auth_Logger),
|
||||
),
|
||||
)
|
||||
.toConstantValue(new SQSEventMessageHandler(eventHandlers, container.get(TYPES.Auth_Logger)))
|
||||
|
||||
container
|
||||
.bind<DomainEventSubscriberFactoryInterface>(TYPES.Auth_DomainEventSubscriberFactory)
|
||||
|
|
|
@ -19,7 +19,6 @@ import {
|
|||
SNSOpenTelemetryDomainEventPublisher,
|
||||
SQSDomainEventSubscriberFactory,
|
||||
SQSEventMessageHandler,
|
||||
SQSOpenTelemetryEventMessageHandler,
|
||||
} from '@standardnotes/domain-events-infra'
|
||||
import { StreamDownloadFile } from '../Domain/UseCase/StreamDownloadFile/StreamDownloadFile'
|
||||
import { FileDownloaderInterface } from '../Domain/Services/FileDownloaderInterface'
|
||||
|
@ -53,7 +52,6 @@ import { S3FileMover } from '../Infra/S3/S3FileMover'
|
|||
import { FSFileMover } from '../Infra/FS/FSFileMover'
|
||||
import { MoveFile } from '../Domain/UseCase/MoveFile/MoveFile'
|
||||
import { SharedVaultValetTokenAuthMiddleware } from '../Infra/InversifyExpress/Middleware/SharedVaultValetTokenAuthMiddleware'
|
||||
import { ServiceIdentifier } from '@standardnotes/domain-core'
|
||||
|
||||
export class ContainerConfigLoader {
|
||||
async load(configuration?: {
|
||||
|
@ -298,15 +296,7 @@ export class ContainerConfigLoader {
|
|||
} else {
|
||||
container
|
||||
.bind<DomainEventMessageHandlerInterface>(TYPES.Files_DomainEventMessageHandler)
|
||||
.toConstantValue(
|
||||
isConfiguredForHomeServerOrSelfHosting
|
||||
? new SQSEventMessageHandler(eventHandlers, container.get(TYPES.Files_Logger))
|
||||
: new SQSOpenTelemetryEventMessageHandler(
|
||||
ServiceIdentifier.NAMES.FilesWorker,
|
||||
eventHandlers,
|
||||
container.get(TYPES.Files_Logger),
|
||||
),
|
||||
)
|
||||
.toConstantValue(new SQSEventMessageHandler(eventHandlers, container.get(TYPES.Files_Logger)))
|
||||
container
|
||||
.bind<DomainEventSubscriberFactoryInterface>(TYPES.Files_DomainEventSubscriberFactory)
|
||||
.toConstantValue(
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
import {
|
||||
ControllerContainer,
|
||||
ControllerContainerInterface,
|
||||
MapperInterface,
|
||||
ServiceIdentifier,
|
||||
} from '@standardnotes/domain-core'
|
||||
import { ControllerContainer, ControllerContainerInterface, MapperInterface } from '@standardnotes/domain-core'
|
||||
import Redis from 'ioredis'
|
||||
import { Container, interfaces } from 'inversify'
|
||||
import { MongoRepository, Repository } from 'typeorm'
|
||||
|
@ -39,7 +34,6 @@ import {
|
|||
SQSDomainEventSubscriberFactory,
|
||||
DirectCallEventMessageHandler,
|
||||
DirectCallDomainEventPublisher,
|
||||
SQSOpenTelemetryEventMessageHandler,
|
||||
SNSOpenTelemetryDomainEventPublisher,
|
||||
} from '@standardnotes/domain-events-infra'
|
||||
import { DumpRepositoryInterface } from '../Domain/Dump/DumpRepositoryInterface'
|
||||
|
@ -510,15 +504,7 @@ export class ContainerConfigLoader {
|
|||
} else {
|
||||
container
|
||||
.bind<DomainEventMessageHandlerInterface>(TYPES.Revisions_DomainEventMessageHandler)
|
||||
.toConstantValue(
|
||||
isConfiguredForHomeServerOrSelfHosting
|
||||
? new SQSEventMessageHandler(eventHandlers, container.get(TYPES.Revisions_Logger))
|
||||
: new SQSOpenTelemetryEventMessageHandler(
|
||||
ServiceIdentifier.NAMES.RevisionsWorker,
|
||||
eventHandlers,
|
||||
container.get(TYPES.Revisions_Logger),
|
||||
),
|
||||
)
|
||||
.toConstantValue(new SQSEventMessageHandler(eventHandlers, container.get(TYPES.Revisions_Logger)))
|
||||
|
||||
container
|
||||
.bind<DomainEventSubscriberFactoryInterface>(TYPES.Revisions_DomainEventSubscriberFactory)
|
||||
|
|
|
@ -17,7 +17,7 @@ import { DomainEventFactory } from '../Domain/Event/DomainEventFactory'
|
|||
import {
|
||||
SNSOpenTelemetryDomainEventPublisher,
|
||||
SQSDomainEventSubscriberFactory,
|
||||
SQSOpenTelemetryEventMessageHandler,
|
||||
SQSEventMessageHandler,
|
||||
} from '@standardnotes/domain-events-infra'
|
||||
import { Timer, TimerInterface } from '@standardnotes/time'
|
||||
import { PredicateRepositoryInterface } from '../Domain/Predicate/PredicateRepositoryInterface'
|
||||
|
@ -35,7 +35,6 @@ 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> {
|
||||
|
@ -149,13 +148,7 @@ export class ContainerConfigLoader {
|
|||
|
||||
container
|
||||
.bind<DomainEventMessageHandlerInterface>(TYPES.DomainEventMessageHandler)
|
||||
.toConstantValue(
|
||||
new SQSOpenTelemetryEventMessageHandler(
|
||||
ServiceIdentifier.NAMES.SchedulerWorker,
|
||||
eventHandlers,
|
||||
container.get(TYPES.Logger),
|
||||
),
|
||||
)
|
||||
.toConstantValue(new SQSEventMessageHandler(eventHandlers, container.get(TYPES.Logger)))
|
||||
container
|
||||
.bind<DomainEventSubscriberFactoryInterface>(TYPES.DomainEventSubscriberFactory)
|
||||
.toConstantValue(
|
||||
|
|
|
@ -16,7 +16,6 @@ import {
|
|||
SNSOpenTelemetryDomainEventPublisher,
|
||||
SQSDomainEventSubscriberFactory,
|
||||
SQSEventMessageHandler,
|
||||
SQSOpenTelemetryEventMessageHandler,
|
||||
} from '@standardnotes/domain-events-infra'
|
||||
import { DomainEventFactoryInterface } from '../Domain/Event/DomainEventFactoryInterface'
|
||||
import { DomainEventFactory } from '../Domain/Event/DomainEventFactory'
|
||||
|
@ -63,7 +62,6 @@ import {
|
|||
ControllerContainer,
|
||||
ControllerContainerInterface,
|
||||
MapperInterface,
|
||||
ServiceIdentifier,
|
||||
SharedVaultUser,
|
||||
} from '@standardnotes/domain-core'
|
||||
import { BaseItemsController } from '../Infra/InversifyExpressUtils/Base/BaseItemsController'
|
||||
|
@ -1152,15 +1150,7 @@ export class ContainerConfigLoader {
|
|||
} else {
|
||||
container
|
||||
.bind<DomainEventMessageHandlerInterface>(TYPES.Sync_DomainEventMessageHandler)
|
||||
.toConstantValue(
|
||||
isConfiguredForHomeServerOrSelfHosting
|
||||
? new SQSEventMessageHandler(eventHandlers, container.get(TYPES.Sync_Logger))
|
||||
: new SQSOpenTelemetryEventMessageHandler(
|
||||
ServiceIdentifier.NAMES.SyncingServerWorker,
|
||||
eventHandlers,
|
||||
container.get(TYPES.Sync_Logger),
|
||||
),
|
||||
)
|
||||
.toConstantValue(new SQSEventMessageHandler(eventHandlers, container.get(TYPES.Sync_Logger)))
|
||||
}
|
||||
|
||||
container
|
||||
|
|
|
@ -18,10 +18,7 @@ import { RedisWebSocketsConnectionRepository } from '../Infra/Redis/RedisWebSock
|
|||
import { AddWebSocketsConnection } from '../Domain/UseCase/AddWebSocketsConnection/AddWebSocketsConnection'
|
||||
import { RemoveWebSocketsConnection } from '../Domain/UseCase/RemoveWebSocketsConnection/RemoveWebSocketsConnection'
|
||||
import { WebSocketsClientMessenger } from '../Infra/WebSockets/WebSocketsClientMessenger'
|
||||
import {
|
||||
SQSDomainEventSubscriberFactory,
|
||||
SQSOpenTelemetryEventMessageHandler,
|
||||
} from '@standardnotes/domain-events-infra'
|
||||
import { SQSDomainEventSubscriberFactory, SQSEventMessageHandler } from '@standardnotes/domain-events-infra'
|
||||
import { ApiGatewayAuthMiddleware } from '../Controller/ApiGatewayAuthMiddleware'
|
||||
|
||||
import {
|
||||
|
@ -37,7 +34,6 @@ import { WebSocketsController } from '../Controller/WebSocketsController'
|
|||
import { WebSocketServerInterface } from '@standardnotes/api'
|
||||
import { ClientMessengerInterface } from '../Client/ClientMessengerInterface'
|
||||
import { WebSocketMessageRequestedEventHandler } from '../Domain/Handler/WebSocketMessageRequestedEventHandler'
|
||||
import { ServiceIdentifier } from '@standardnotes/domain-core'
|
||||
|
||||
export class ContainerConfigLoader {
|
||||
async load(): Promise<Container> {
|
||||
|
@ -144,13 +140,7 @@ export class ContainerConfigLoader {
|
|||
|
||||
container
|
||||
.bind<DomainEventMessageHandlerInterface>(TYPES.DomainEventMessageHandler)
|
||||
.toConstantValue(
|
||||
new SQSOpenTelemetryEventMessageHandler(
|
||||
ServiceIdentifier.NAMES.WebsocketsWorker,
|
||||
eventHandlers,
|
||||
container.get(TYPES.Logger),
|
||||
),
|
||||
)
|
||||
.toConstantValue(new SQSEventMessageHandler(eventHandlers, container.get(TYPES.Logger)))
|
||||
container
|
||||
.bind<DomainEventSubscriberFactoryInterface>(TYPES.DomainEventSubscriberFactory)
|
||||
.toConstantValue(
|
||||
|
|
Loading…
Reference in a new issue