Open
Description
Issue
I added the OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore instrumentation to an application with an Oracle backing database and noticed the span name is missing. Below is the output from the collector, the Name
field and db.name
attributes are empty.
InstrumentationLibrary OpenTelemetry.EntityFrameworkCore 1.0.0.0
Span #0
Trace ID : 67d1efb2297cc274af23391f94f580ce
Parent ID : 4be5e8af90e26f3e
ID : 663a06083b428e0a
Name :
Kind : SPAN_KIND_CLIENT
Start time : 2022-03-01 16:09:16.3778913 +0000 UTC
End time : 2022-03-01 16:09:17.5975095 +0000 UTC
Status code : STATUS_CODE_UNSET
Status message :
Attributes:
-> db.system: STRING(oracle)
-> db.name: STRING()
Possible Root Cause
It looks like the OracleConnection.Database property will always return an empty string. Thinking the database name would need to be pulled from the connection string?
Line 90 where the Database
property is fetched from IDbConnection.
var database = (string)this.databaseFetcher.Fetch(connection);