|
@@ -3,6 +3,7 @@ import 'reflect-metadata'
|
|
import { Logger } from 'winston'
|
|
import { Logger } from 'winston'
|
|
import * as dayjs from 'dayjs'
|
|
import * as dayjs from 'dayjs'
|
|
import * as utc from 'dayjs/plugin/utc'
|
|
import * as utc from 'dayjs/plugin/utc'
|
|
|
|
+import * as AWSXRay from 'aws-xray-sdk'
|
|
import { TimerInterface } from '@standardnotes/time'
|
|
import { TimerInterface } from '@standardnotes/time'
|
|
|
|
|
|
import { ContainerConfigLoader } from '../src/Bootstrap/Container'
|
|
import { ContainerConfigLoader } from '../src/Bootstrap/Container'
|
|
@@ -21,6 +22,14 @@ void container.load().then((container) => {
|
|
const env: Env = new Env()
|
|
const env: Env = new Env()
|
|
env.load()
|
|
env.load()
|
|
|
|
|
|
|
|
+ const isConfiguredForAWSProduction =
|
|
|
|
+ env.get('MODE', true) !== 'home-server' && env.get('MODE', true) !== 'self-hosted'
|
|
|
|
+
|
|
|
|
+ if (isConfiguredForAWSProduction) {
|
|
|
|
+ AWSXRay.enableManualMode()
|
|
|
|
+ AWSXRay.config([AWSXRay.plugins.ECSPlugin])
|
|
|
|
+ }
|
|
|
|
+
|
|
const logger: Logger = container.get(TYPES.Logger)
|
|
const logger: Logger = container.get(TYPES.Logger)
|
|
const timer: TimerInterface = container.get(TYPES.Timer)
|
|
const timer: TimerInterface = container.get(TYPES.Timer)
|
|
const now = timer.getTimestampInMicroseconds()
|
|
const now = timer.getTimestampInMicroseconds()
|