Skip to content
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

Don't capture db.operation.name and db.collection.name from query formats that support multiples #1566

Merged
merged 11 commits into from
Nov 25, 2024

Conversation

trask
Copy link
Member

@trask trask commented Nov 10, 2024

Don't capture db.operation.name and db.collection.name from query formats that support multiples.

The reason behind this change is that it could be confusing to have db.operation.name and db.collection.name captured for some SQL operations but not for other SQL operations, also leading to an inconsistent experience in SQL metrics.

And these parsed values (single or multiple) are now present in db.query.summary, so the loss of information seems minimal.

Specifically, db.operation.name is changed from:

A single database query may involve multiple operations. If the operation name is parsed from the query text, it SHOULD only be captured for queries that contain a single operation or when the operation name describing the whole query is available by other means.

to:

The operation name SHOULD NOT be extracted from db.query.text, unless the query format is known to only ever have a single operation name present.

and db.collection.name is changed from:

If the collection name is parsed from the query text, it SHOULD only be captured for queries that contain a single collection and it SHOULD match the value provided in the query text including any schema and database name prefix.

to:

The collection name SHOULD NOT be extracted from db.query.text, unless the query format is known to only ever have a single collection name present and the collection name is known to always be under the captured db.namespace.

@trask trask force-pushed the refine-operation-and-collection branch 8 times, most recently from c4e26d6 to 4fd09f2 Compare November 10, 2024 22:57
@trask trask changed the title Refine db.operation.name and db.collection.name Don't capture db.operation.name and db.collection.name from query formats that support multiples Nov 10, 2024
@trask trask force-pushed the refine-operation-and-collection branch from 4fd09f2 to 514e388 Compare November 10, 2024 23:02
@trask trask marked this pull request as ready for review November 10, 2024 23:05
@trask trask requested review from a team as code owners November 10, 2024 23:05
@trask trask marked this pull request as draft November 10, 2024 23:09
@trask trask force-pushed the refine-operation-and-collection branch from d2b3fb2 to 70ed3de Compare November 10, 2024 23:15
model/database/registry.yaml Show resolved Hide resolved
docs/database/redis.md Show resolved Hide resolved
docs/database/cassandra.md Show resolved Hide resolved
docs/database/cosmosdb.md Show resolved Hide resolved
docs/database/sql.md Outdated Show resolved Hide resolved
docs/database/hbase.md Show resolved Hide resolved
@trask trask requested a review from a team as a code owner November 25, 2024 19:31
@lmolkova lmolkova merged commit 3fa52ac into open-telemetry:main Nov 25, 2024
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants