From 616cfbdbeed1d24dc0e39359f058783c5b725234 Mon Sep 17 00:00:00 2001 From: Myrotvorets Date: Thu, 28 Nov 2024 11:35:23 +0200 Subject: [PATCH] Do not set ATTR_DB_USER --- lib/connectionattributes.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lib/connectionattributes.ts b/lib/connectionattributes.ts index 71f997b5..e24daedd 100644 --- a/lib/connectionattributes.ts +++ b/lib/connectionattributes.ts @@ -1,8 +1,6 @@ import { AttributeValue, Attributes } from '@opentelemetry/api'; import { ATTR_DB_NAMESPACE, - // eslint-disable-next-line import/no-deprecated, sonarjs/deprecation, @typescript-eslint/no-deprecated - ATTR_DB_USER, ATTR_NETWORK_PEER_PORT, ATTR_SERVER_ADDRESS, } from '@opentelemetry/semantic-conventions/incubating'; @@ -33,7 +31,6 @@ export class ConnectionAttributes { private parseConnection(connection: Readonly): void { this.setDbName(connection); - this.setDbUser(connection); this.setNetAttributes(connection); } @@ -45,15 +42,6 @@ export class ConnectionAttributes { } } - private setDbUser(connection: Readonly): void { - const user = findAttribute(connection, ['user']); - // istanbul ignore if - if (user) { - // eslint-disable-next-line sonarjs/deprecation, @typescript-eslint/no-deprecated - this.attributes[ATTR_DB_USER] = user; - } - } - private setNetAttributes(connection: Readonly): void { const name = findAttribute(connection, ['host', 'server', 'unixSocket', 'socketPath']); const port = findAttribute(connection, ['port']);