-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename db.name
to db.namespace
and generalize it
#911
Rename db.name
to db.namespace
and generalize it
#911
Conversation
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
db.name
to db.collection.namespace
db.name
to db.namespace
db.name
to db.namespace
db.name
to db.namespace
db.name
to db.namespace
db.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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These sound like table (collection) names rather than namespace (database) names
Changes
Deprecates
db.name
anddb.redis.database_index
in favor ofdb.collection.namespace
Removes
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.mytable
namespace = mydb
andname = mytable
and span name isSELECT mydb.mytable
namespace
:namespace = mydb.dbo
,name = dbo.mytable
, span name isSELECT mydb.dbo.dbo.mytable
The 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]