Skip to content

Commit

Permalink
Do not set ATTR_DB_USER
Browse files Browse the repository at this point in the history
  • Loading branch information
myrotvorets-team committed Nov 28, 2024
1 parent c0ead58 commit 616cfbd
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions lib/connectionattributes.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -33,7 +31,6 @@ export class ConnectionAttributes {

private parseConnection(connection: Readonly<Knex.StaticConnectionConfig>): void {
this.setDbName(connection);
this.setDbUser(connection);
this.setNetAttributes(connection);
}

Expand All @@ -45,15 +42,6 @@ export class ConnectionAttributes {
}
}

private setDbUser(connection: Readonly<Knex.StaticConnectionConfig>): 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<Knex.StaticConnectionConfig>): void {
const name = findAttribute(connection, ['host', 'server', 'unixSocket', 'socketPath']);
const port = findAttribute(connection, ['port']);
Expand Down

0 comments on commit 616cfbd

Please sign in to comment.