-
Notifications
You must be signed in to change notification settings - Fork 162
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
Mark database semconv as release candidate #1101
base: main
Are you sure you want to change the base?
Conversation
model/registry/db.yaml
Outdated
brief: 'MariaDB (This value has stability level RELEASE CANDIDATE)' | ||
stability: experimental # RELEASE CANDIDATE |
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.
need to define db.namespace
model/registry/db.yaml
Outdated
brief: 'MySQL (This value has stability level RELEASE CANDIDATE)' | ||
stability: experimental # RELEASE CANDIDATE |
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.
need to define db.namespace
model/registry/db.yaml
Outdated
brief: 'PostgreSQL (This value has stability level RELEASE CANDIDATE)' | ||
stability: experimental # RELEASE CANDIDATE |
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.
need to define db.namespace
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.
from https://www.postgresql.org/docs/current/manage-ag-overview.html:
the full hierarchy is: cluster, database, schema, table (or some other kind of object, such as a function).
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.
Cluster name
From https://www.postgresql.org/docs/16/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-PROC-TITLE
name that identifies this database cluster (instance) for various purposes. The cluster name appears in the process title for all server processes in this cluster.
I don't believe the cluster name is used when connecting to a database, and so unlikely to be available to instrumentation.
I'd suggest we leave this out for now, can always add it as optional prefix in the future if we find use case and better understanding of it.
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.
In postgres, client has searchpath
which is one or more "current" schemas
https://www.postgresql.org/docs/current/ddl-schemas.html/l
The first schema named in the search path is called the current schema
db.namespace
could be defined as database.currentschema
Example 1
db.namespace
=mydatabase.myschema
db.query.text
=select * from mytable
db.collection.name
=mytable
Example 2
db.namespace
=mydatabase.myschema
db.query.text
=select * from myschema.mytable
db.collection.name
=myschema.mytable
Example 3
db.namespace
=mydatabase.myschema
db.query.text
=select * from myschema2.mytable
db.collection.name
=myschema2.mytable
Example 1 (db namespace doesn't know schema):
db.namespace
=mydatabase
db.query.text
=select * from mytable
db.collection.name
=mytable
Example 2 (db namespace doesn't know schema):
db.namespace
=mydatabase
db.query.text
=select * from myschema.mytable
db.collection.name
=myschema.mytable
Example 3 (db namespace doesn't know schema):
db.namespace
=mydatabase
db.query.text
=select * from myschema2.mytable
db.collection.name
=myschema2.mytable
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.
In https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/sql.md:
If instrumentation cannot reliably determine the current database name, it SHOULD NOT set
db.namespace
.
Consider relaxing this to "best effort".
If a database system has multiple namespace components
Consider mentioning schema as an example component.
623f73e
to
fde61e8
Compare
Fixes #964
Fixes #965
Changes
Mark database semconv as release candidate
Using the notes/briefs to mark attributes/enum values as "release candidate" pending #1096