From f1b6fa55dfe9e71b02521dcb456bc6e0339ddd61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Wed, 3 Jan 2024 10:05:25 +0100 Subject: [PATCH] fix(syncing-server): enable opentelemetry --- packages/syncing-server/bin/server.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/syncing-server/bin/server.ts b/packages/syncing-server/bin/server.ts index 964e881da..93b667282 100644 --- a/packages/syncing-server/bin/server.ts +++ b/packages/syncing-server/bin/server.ts @@ -1,5 +1,11 @@ import 'reflect-metadata' +import { OpenTelemetrySDK } from '@standardnotes/domain-events-infra' +import { MapperInterface, ServiceIdentifier } from '@standardnotes/domain-core' + +const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.SyncingServer }) +sdk.start() + import '../src/Infra/InversifyExpressUtils/AnnotatedFallbackController' import '../src/Infra/InversifyExpressUtils/AnnotatedHealthCheckController' import '../src/Infra/InversifyExpressUtils/AnnotatedItemsController' @@ -14,7 +20,6 @@ import * as grpc from '@grpc/grpc-js' import { urlencoded, json, Request, Response, NextFunction } from 'express' import * as winston from 'winston' import { InversifyExpressServer } from 'inversify-express-utils' -import { MapperInterface } from '@standardnotes/domain-core' import { SyncResponse, SyncingService } from '@standardnotes/grpc' import TYPES from '../src/Bootstrap/Types'