|
@@ -16,13 +16,12 @@ import { RedisCrossServiceTokenCache } from '../Infra/Redis/RedisCrossServiceTok
|
|
import { WebSocketAuthMiddleware } from '../Controller/WebSocketAuthMiddleware'
|
|
import { WebSocketAuthMiddleware } from '../Controller/WebSocketAuthMiddleware'
|
|
import { InMemoryCrossServiceTokenCache } from '../Infra/InMemory/InMemoryCrossServiceTokenCache'
|
|
import { InMemoryCrossServiceTokenCache } from '../Infra/InMemory/InMemoryCrossServiceTokenCache'
|
|
import { DirectCallServiceProxy } from '../Service/Proxy/DirectCallServiceProxy'
|
|
import { DirectCallServiceProxy } from '../Service/Proxy/DirectCallServiceProxy'
|
|
-import { ServiceContainerInterface, ServiceIdentifier } from '@standardnotes/domain-core'
|
|
|
|
|
|
+import { ServiceContainerInterface } from '@standardnotes/domain-core'
|
|
import { EndpointResolverInterface } from '../Service/Resolver/EndpointResolverInterface'
|
|
import { EndpointResolverInterface } from '../Service/Resolver/EndpointResolverInterface'
|
|
import { EndpointResolver } from '../Service/Resolver/EndpointResolver'
|
|
import { EndpointResolver } from '../Service/Resolver/EndpointResolver'
|
|
import { RequiredCrossServiceTokenMiddleware } from '../Controller/RequiredCrossServiceTokenMiddleware'
|
|
import { RequiredCrossServiceTokenMiddleware } from '../Controller/RequiredCrossServiceTokenMiddleware'
|
|
import { OptionalCrossServiceTokenMiddleware } from '../Controller/OptionalCrossServiceTokenMiddleware'
|
|
import { OptionalCrossServiceTokenMiddleware } from '../Controller/OptionalCrossServiceTokenMiddleware'
|
|
import { Transform } from 'stream'
|
|
import { Transform } from 'stream'
|
|
-import { OpenTelemetrySDK, OpenTelemetrySDKInterface } from '@standardnotes/domain-events-infra'
|
|
|
|
|
|
|
|
export class ContainerConfigLoader {
|
|
export class ContainerConfigLoader {
|
|
async load(configuration?: {
|
|
async load(configuration?: {
|
|
@@ -44,12 +43,6 @@ export class ContainerConfigLoader {
|
|
.bind<boolean>(TYPES.ApiGateway_IS_CONFIGURED_FOR_HOME_SERVER_OR_SELF_HOSTING)
|
|
.bind<boolean>(TYPES.ApiGateway_IS_CONFIGURED_FOR_HOME_SERVER_OR_SELF_HOSTING)
|
|
.toConstantValue(isConfiguredForHomeServerOrSelfHosting)
|
|
.toConstantValue(isConfiguredForHomeServerOrSelfHosting)
|
|
|
|
|
|
- if (!isConfiguredForHomeServerOrSelfHosting) {
|
|
|
|
- container
|
|
|
|
- .bind<OpenTelemetrySDKInterface>(TYPES.ApiGateway_OpenTelemetrySDK)
|
|
|
|
- .toConstantValue(new OpenTelemetrySDK(ServiceIdentifier.NAMES.ApiGateway))
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
const winstonFormatters = [winston.format.splat(), winston.format.json()]
|
|
const winstonFormatters = [winston.format.splat(), winston.format.json()]
|
|
if (env.get('NEW_RELIC_ENABLED', true) === 'true') {
|
|
if (env.get('NEW_RELIC_ENABLED', true) === 'true') {
|
|
await import('newrelic')
|
|
await import('newrelic')
|