Skip to content

Rename db.operation to db.operation.name#875

Merged
lmolkova merged 10 commits intoopen-telemetry:mainfrom
trask:db-operation-name
Apr 5, 2024
Merged

Rename db.operation to db.operation.name#875
lmolkova merged 10 commits intoopen-telemetry:mainfrom
trask:db-operation-name

Conversation

@trask
Copy link
Copy Markdown
Member

@trask trask commented Apr 3, 2024

Changes

Renames db.operation to db.operation.name, to be more future proof and allow other attributes under the db.operation.* namespace in the future.

Merge requirement checklist

Fixes #884

@pyohannes
Copy link
Copy Markdown
Contributor

In messaging, we have messaging.operation, and I wonder if consistency is important here.

Do you have an example of what additional attributes might be expected under db.operation?

@lmolkova
Copy link
Copy Markdown
Member

lmolkova commented Apr 4, 2024

In messaging, we have messaging.operation, and I wonder if consistency is important here.

Do you have an example of what additional attributes might be expected under db.operation?

I think we might entertain the idea of db.operation.duration metric (and it might still be an open question for messaging metrics since operation list is an open set).

In case of databases, we have a precedent when CosmosDB records operation name (e.g. ReadItems) along with db.cosmosdb.operation_type (e.g. Read). We might want to generalize at some point.
If we translated it to messaging, we'd do something like messaging.operation.type = settle, messaging.operation.name = ack.

@lmolkova
Copy link
Copy Markdown
Member

lmolkova commented Apr 4, 2024

Also, graphql has operation.name and operation.type - https://github.com/open-telemetry/semantic-conventions/blob/main/docs/graphql/graphql-spans.md

I'm starting to understand why graphql used to be in the DB semconv - both try to describe QL

@trask trask marked this pull request as ready for review April 5, 2024 01:10
@trask trask requested review from a team April 5, 2024 01:10
@pyohannes
Copy link
Copy Markdown
Contributor

Discussed in the messaging workgroup: for messaging we'll take over what's adopted for databases, as we don't see any strong reasons to stick with messaging.operation as an attribute (and be inconsistent with database semantic conventions).

See the related issue #890.

@trask trask requested a review from gregkalapos April 5, 2024 15:37
@lmolkova lmolkova merged commit f812621 into open-telemetry:main Apr 5, 2024
@trask trask deleted the db-operation-name branch October 14, 2024 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Rename db.operation to db.operation.name for future proofing

7 participants