File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
plugins/node/instrumentation-sequelize/src Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import {
2121 SpanStatusCode ,
2222 trace ,
2323 diag ,
24+ Attributes ,
2425} from '@opentelemetry/api' ;
2526import { suppressTracing } from '@opentelemetry/core' ;
2627import {
@@ -162,8 +163,7 @@ export class SequelizeInstrumentation extends InstrumentationBase<SequelizeInstr
162163 else tableName = extractTableFromQuery ( statement ) ;
163164 }
164165
165- // eslint-disable-next-line @typescript-eslint/no-explicit-any
166- const attributes : Record < string , any > = {
166+ const attributes : Attributes = {
167167 [ ATTR_DB_SYSTEM_NAME ] : sequelizeInstance . getDialect ( ) ,
168168 [ ATTR_DB_NAMESPACE ] : config ?. database ,
169169 [ ATTR_DB_OPERATION_NAME ] : operation ,
@@ -174,10 +174,6 @@ export class SequelizeInstrumentation extends InstrumentationBase<SequelizeInstr
174174 [ ATTR_NETWORK_TRANSPORT ] : self . _getNetTransport ( config ?. protocol ) ,
175175 } ;
176176
177- Object . entries ( attributes ) . forEach ( ( [ key , value ] ) => {
178- if ( value === undefined ) delete attributes [ key ] ;
179- } ) ;
180-
181177 const newSpan : Span = self . tracer . startSpan ( `Sequelize ${ operation } ` , {
182178 kind : SpanKind . CLIENT ,
183179 attributes,
You can’t perform that action at this time.
0 commit comments