-
Notifications
You must be signed in to change notification settings - Fork 894
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
Propose to remove db.cassandra.keyspace and use db.name instead #1760
Comments
I'm not quite familiar with Cassandra and whether using CC @arminru who has originally proposed this name: #575 @Oberon00 @anuraaga @carlosalberto who approved that PR in case there are objections. |
I think this issue is essentially the DB / Cassandra version of #1748, they're the same concept of overriding a common name with a specific one, which is probably not a good pattern for conventions since instrumentation becomes more complicated, and backends become less generic. |
I agree that they go into the same direction but there is one major difference: For jsonrpc vs generic rpc, the attribute was called simply "method" in both the generic and the specific convention. So IMHO there was a strong case for reusing the generic attribute. Here, the generic name is "name" and the specific name is "keyspace". It is not clear to me whether they are 100% equivalent in all cases. I see db.name as a bit problematic, as it might be too generic. You have to know that db.name is the keyspace for cassandra or the schema name for some SQL databases (others might call it DB name already). |
So far everybody agreed generalization is great. How do we resolve this:
|
I can see two general ways:
If we go the general route: db.name should probably be something "top-level". But here the problem already begins: In MSSQL, should we use the instance name as db.name, and have the database name as a db.mssql.db_name? Obviously not, but then we don't have the actual top-level as db.name. Probably the criteria should be that we want the logical top-level, disregarding physical deployment details. But that may be difficult for some databases. Then, what happens if some database has a concept named "database name" but has something more top level? I think in Oracle, all schemas belong to a particular user, so the user is the top-level container. Bu we would have the schema name as db.name if we want to be consistent across SQL DBs, which we probably need to be from a practical perspective, otherwise you can't do e.g. a generic JDBC instrumentation. |
@Oberon00 this is really helpful, thanks. What do you think of defining |
The HBase-specific attribute `db.hbase.namespace` has been deprecated in favor of the generic `db.name`. See also open-telemetry/opentelemetry-specification#1760
The HBase-specific attribute `db.hbase.namespace` has been deprecated in favor of the generic `db.name`. See also open-telemetry/opentelemetry-specification#1760
The HBase-specific attribute `db.hbase.namespace` has been deprecated in favor of the generic `db.name`. See also open-telemetry/opentelemetry-specification#1760
The HBase-specific attribute `db.hbase.namespace` has been deprecated in favor of the generic `db.name`. See also open-telemetry/opentelemetry-specification#1760
The HBase-specific attribute `db.hbase.namespace` has been deprecated in favor of the generic `db.name`. See also open-telemetry/opentelemetry-specification#1760
The HBase-specific attribute `db.hbase.namespace` has been deprecated in favor of the generic `db.name`. See also open-telemetry/opentelemetry-specification#1760
The HBase-specific attribute `db.hbase.namespace` has been deprecated in favor of the generic `db.name`. See also open-telemetry/opentelemetry-specification#1760
The HBase-specific attribute `db.hbase.namespace` has been deprecated in favor of the generic `db.name`. See also open-telemetry/opentelemetry-specification#1760
The HBase-specific attribute `db.hbase.namespace` has been deprecated in favor of the generic `db.name`. See also open-telemetry/opentelemetry-specification#1760
The HBase-specific attribute `db.hbase.namespace` has been deprecated in favor of the generic `db.name`. See also open-telemetry/opentelemetry-specification#1760
) The HBase-specific attribute `db.hbase.namespace` has been deprecated in favor of the generic `db.name`. See also open-telemetry/opentelemetry-specification#1760 Signed-off-by: Duo Zhang <[email protected]> Signed-off-by: Tak Lon (Stephen) Wu <[email protected]>
…ache#4015) The HBase-specific attribute `db.hbase.namespace` has been deprecated in favor of the generic `db.name`. See also open-telemetry/opentelemetry-specification#1760 Signed-off-by: Duo Zhang <[email protected]> Signed-off-by: Tak Lon (Stephen) Wu <[email protected]>
…ache#4015) The HBase-specific attribute `db.hbase.namespace` has been deprecated in favor of the generic `db.name`. See also open-telemetry/opentelemetry-specification#1760 Signed-off-by: Duo Zhang <[email protected]> Signed-off-by: Tak Lon (Stephen) Wu <[email protected]>
) The HBase-specific attribute `db.hbase.namespace` has been deprecated in favor of the generic `db.name`. See also open-telemetry/opentelemetry-specification#1760 Signed-off-by: Duo Zhang <[email protected]> Signed-off-by: Tak Lon (Stephen) Wu <[email protected]>
…ache#4015) The HBase-specific attribute `db.hbase.namespace` has been deprecated in favor of the generic `db.name`. See also open-telemetry/opentelemetry-specification#1760 Signed-off-by: Duo Zhang <[email protected]> Signed-off-by: Tak Lon (Stephen) Wu <[email protected]>
) The HBase-specific attribute `db.hbase.namespace` has been deprecated in favor of the generic `db.name`. See also open-telemetry/opentelemetry-specification#1760 Signed-off-by: Duo Zhang <[email protected]> Signed-off-by: Tak Lon (Stephen) Wu <[email protected]>
…ame (open-telemetry#1973) Fixes open-telemetry#1760 ## Changes Removes `db.cassandra.keyspace` and `db.hbase.namespace` (in preference for using `db.name`). Clarifies `db.name` in the case where a database product provides multiple concepts that could be mapped to `db.name`.
What are you trying to achieve?
Consistency across different database client spans.
What did you expect to see?
Cassandra keyspace captured as
db.name
, similar to other database client spans.Additional context:
The specification currently says that
db.cassandra.keyspace
isBut I'm not sure why there is this special case for Cassandra. It seems to make sense to use
db.name
instead.This attribute appears to come from #575, but I couldn't find any discussion in that PR (or in the related issue) about why
db.cassandra.keyspace
should be used instead ofdb.name
.This issue stems from discussion in open-telemetry/opentelemetry-java-instrumentation#3199
The text was updated successfully, but these errors were encountered: