Rename db.name to db.namespace and generalize it#911
Rename db.name to db.namespace and generalize it#911lmolkova merged 17 commits intoopen-telemetry:mainfrom
db.name to db.namespace and generalize it#911Conversation
|
Was there any discussion before this PR in some SIG meeting or similar? Is there any issue associated with this PR? |
yes, this is the design approach discussed within DB semconv WG: https://docs.google.com/document/d/1zTi_Z4WBisytPnXTpwtnGOK-4Gv5oSTuMHvIQ8--5hg |
wdyt of just |
For SQL at least:
|
a68803e to
a8e64c3
Compare
|
As discussed in the last WG call, looked into what we can collect in .NET. The
I ran following code snippet with different DBs and libraries: Above code queries the MS SQL Server with System.Data.SqlClientOutput: MySQL with MySqlConnectorOutput: PostgreSql with NpgsqlOutput: So, overall it seems, at least in ADO.NET we can get the schema. Issue I see with this is that this seems to query the database - not only that, but |
db.name to db.collection.namespacedb.name to db.namespace
db.name to db.namespacedb.name to db.namespace
db.name to db.namespacedb.name to db.namespace and generalize it
207d213 to
a308a49
Compare
4cd93aa to
55697b5
Compare
Co-authored-by: Trask Stalnaker <[email protected]>
5a87e3f to
15a0841
Compare
|
|
||
| Semantic conventions for individual database systems SHOULD document what `db.namespace` | ||
| means in the context of that system. | ||
| examples: [ 'customers', 'test.users' ] |
There was a problem hiding this comment.
These sound like table (collection) names rather than namespace (database) names
Changes
Deprecates
db.nameanddb.redis.database_indexin favor ofdb.collection.namespaceRemoves
db.mssql.instance_name(includes it intodb.collection.namespace).Open question:
where does the schema belong?
name:namespace = mydb,name = dbo.mytable, span name isSELECT mydb.dbo.mytablenamespace = mydbandname = mytableand span name isSELECT mydb.mytablenamespace:namespace = mydb.dbo,name = dbo.mytable, span name isSELECT mydb.dbo.dbo.mytableThe schema (at least sometimes) requires actual database call: postgres jdbc driver, SQL Server JDBC driver.
It's not a connection property per se, but a database server configuration, i.e. can be modified elsewhere and can't be cached on the client.
So in this PR schema stays inside table name (if users provided it in the query) and is not captured inside the database name.
Merge requirement checklist
[chore]