I have a nestjs application with open telemetry setup using the AzureMonitorTraceExporter
. (v1.0.0-beta.10).
Internally we're using Prisma ORM with auto instrumentation in order to trace our db calls.
When viewing traces through jaeger locally all span attributes are showing properly, however when exploring traces through appinsight all db.statement
attributes are missing.
Here's an overview of the span :
items to be sent [
Span {
attributes: {
'db.statement': 'SELECT "■■■■■■"."■■■■■■■■"."■■■■■■■", "■■■■■■■"."■■■■■■■■■■■■■■■■"."■■■■■■■■■■■■■■■" FROM "■■■■■■■"."■■■■■■■■■■■■■■■■■■" WHERE "■■■■■■■"."■■■■■■■■■■■■■■■■"."■■■■■■■■" = $1 LIMIT $2 OFFSET $3 /* traceparent=■■■■■■■■■■■■■■ */'
},
links: [],
events: [],
status: { code: 0 },
endTime: [ 1669233370, 398610283 ],
_ended: true,
_duration: [ 0, 730381 ],
name: 'prisma:engine:db_query',
_spanContext: {
traceId: '■■■■■■■■■■■■■■■■■■■',
spanId: '■■■■■■■■■■■■■■■■■',
traceFlags: 1
},
parentSpanId: '■■■■■■■■■■■■■■■■■',
kind: 0,
startTime: [ 1669233370, 397879902 ],
resource: Resource { attributes: [Object] },
instrumentationLibrary: { name: 'prisma', version: undefined, schemaUrl: undefined },
_spanLimits: {
attributeValueLengthLimit: Infinity,
attributeCountLimit: 128,
linkCountLimit: 128,
eventCountLimit: 128
},
_spanProcessor: MultiSpanProcessor { _spanProcessors: [Array] },
_attributeValueLengthLimit: Infinity
}
]
Any idea why appinsight would get rid of this attribute ?
I've tried various versions of the AzureMonitorTraceExporter
package along with simply using the appInsight nodejs SDK (though with the later all prisma:engine:*
traces are just gone altogether alongside other ones).
I would expect to have my db.statement
attributes be displayed in the custom attributes
section when exploring traces (just like they do when viewing them through Jaeger or Tempo.