From a8507789010409d32e0da355d5ee99266119f640 Mon Sep 17 00:00:00 2001 From: Etienne Noel Date: Wed, 5 Jun 2024 15:40:44 -0700 Subject: [PATCH 1/2] - Fix issue --- packages/mysql/src/configs/mysql.config.ts | 26 +++++++------------ .../telemetry/src/managers/tracing.manager.ts | 2 +- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/packages/mysql/src/configs/mysql.config.ts b/packages/mysql/src/configs/mysql.config.ts index c232a1e0..8e23a790 100644 --- a/packages/mysql/src/configs/mysql.config.ts +++ b/packages/mysql/src/configs/mysql.config.ts @@ -1,18 +1,10 @@ -import {injectable} from "tsyringe"; -import {ServiceDefinitionTagEnum, tag} from "@pristine-ts/common"; - -@tag(ServiceDefinitionTagEnum.MysqlConfig) -@injectable() -export class MysqlConfig { - constructor( - public readonly uniqueKeyname: string, - public readonly host: string, - public readonly port: number, - public readonly user: string, - public readonly password: string, - public readonly connectionLimit: number, - public readonly debug: boolean, - public readonly database: string, - ) { - } +export interface MysqlConfig { + uniqueKeyname: string, + host: string, + port: number, + user: string, + password: string, + connectionLimit: number, + debug: boolean, + database: string, } \ No newline at end of file diff --git a/packages/telemetry/src/managers/tracing.manager.ts b/packages/telemetry/src/managers/tracing.manager.ts index c571a7d2..90eb5313 100644 --- a/packages/telemetry/src/managers/tracing.manager.ts +++ b/packages/telemetry/src/managers/tracing.manager.ts @@ -125,7 +125,7 @@ export class TracingManager implements TracingManagerInterface { if (parentSpans) { if (parentSpans.length > 1) { if (!parentId) { - this.loghandler.error("Error finding the parent span, there are multiple spans with that keyname and no id is provided.", {parentKeyname}); + //this.loghandler.error("Error finding the parent span, there are multiple spans with that keyname and no id is provided.", {parentKeyname}); } else { parentSpan = parentSpans.find(span => span.id === parentId) ?? parentSpan; } From dc4257cf4cc9a481a0a323a7020dfc93146bd0e3 Mon Sep 17 00:00:00 2001 From: Etienne Noel Date: Wed, 5 Jun 2024 15:43:32 -0700 Subject: [PATCH 2/2] - Update. --- packages/mysql/src/mysql.module.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/mysql/src/mysql.module.ts b/packages/mysql/src/mysql.module.ts index 9d64674f..68a4f34a 100644 --- a/packages/mysql/src/mysql.module.ts +++ b/packages/mysql/src/mysql.module.ts @@ -32,7 +32,16 @@ export const MysqlModule: ModuleInterface = { providerRegistrations: [ { token: ServiceDefinitionTagEnum.MysqlConfig, - useValue: new MysqlConfig("__default__", "", 0, "", "", 0, false, "") + useValue: { + uniqueKeyname: "__default__", + host: "", + port: 0, + user: "", + password: "", + connectionLimit: 0, + debug: false, + database: "", + } } ] };