mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-27 12:04:56 +02:00
31 lines
1013 B
TypeScript
31 lines
1013 B
TypeScript
//
|
|
// Copyright © 2023 Hardcore Engineering Inc.
|
|
//
|
|
import { serveAccount } from '@hcengineering/account-service'
|
|
import { Analytics } from '@hcengineering/analytics'
|
|
import { configureAnalytics, createOpenTelemetryMetricsContext, SplitLogger } from '@hcengineering/analytics-service'
|
|
import { newMetrics } from '@hcengineering/core'
|
|
import { initStatisticsContext, loadBrandingMap } from '@hcengineering/server-core'
|
|
import { join } from 'path'
|
|
|
|
configureAnalytics('account', process.env.VERSION ?? '0.7.0')
|
|
Analytics.setTag('application', 'account')
|
|
|
|
const metricsContext = initStatisticsContext('account', {
|
|
factory: () =>
|
|
createOpenTelemetryMetricsContext(
|
|
'account',
|
|
{},
|
|
{},
|
|
newMetrics(),
|
|
new SplitLogger('account', {
|
|
root: join(process.cwd(), 'logs'),
|
|
enableConsole: (process.env.ENABLE_CONSOLE ?? 'true') === 'true'
|
|
})
|
|
)
|
|
})
|
|
|
|
const brandingPath = process.env.BRANDING_PATH
|
|
|
|
serveAccount(metricsContext, loadBrandingMap(brandingPath), () => {})
|