Skip to content

DRIVERS-719 OpenTelementry specification #1826

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

Draft
wants to merge 34 commits into
base: master
Choose a base branch
from
Draft

Conversation

nhachicha
Copy link

@nhachicha nhachicha commented Aug 8, 2025

DRIVERS-719

  • Update schema to 1.26
  • Added invalid test to unified test runner
  • Added nominal valid tests for the 3 tracing grouping (Operation, Cursor and Transaction)
  • Update description of the new field observeTracingMessages and expectTracingMessages
  • Merge back the draft spec into this

@nhachicha nhachicha self-assigned this Aug 8, 2025
@nhachicha nhachicha changed the title OpenTelemetry DRIVERS-719 OpenTelementry specification Aug 8, 2025
Comment on lines +118 to +120
- `driver_operation_name db.collection_name` if the command is executed on a collection (e.g.,
`findOneAndDelete warehouse.users`).
- `db.driver_operation_name` if there is no specific collection for the command (e.g., `warehouse.runCommand`).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks inconsistent. Why the driver_operation_name is at the beginning for a collection operation and at the end for a database operation?

One of this would be more consistent:

  • warehouse.users.findOneAndDelete and warehouse.runCommand
  • findOneAndDelete warehouse.users and runCommand warehouse

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GromNaN: Note the same inconsistency exists in the Instrumenting Server Commands > Span Name section below. I'd be in favor of using the operation/command name as the initial prefix and then appending the database or full namespace as appropriate.


Spans SHOULD have the following attributes:

| Attribute | Type | Description | Requirement Level |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

db.client.connection.pool.name is not listed. Is it because it doesn't have the "stable" flag? It would be easy to fill when the connection is created by an ODM, they usually have a connection name.

Comment on lines +118 to +120
- `driver_operation_name db.collection_name` if the command is executed on a collection (e.g.,
`findOneAndDelete warehouse.users`).
- `db.driver_operation_name` if there is no specific collection for the command (e.g., `warehouse.runCommand`).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GromNaN: Note the same inconsistency exists in the Instrumenting Server Commands > Span Name section below. I'd be in favor of using the operation/command name as the initial prefix and then appending the database or full namespace as appropriate.

- `enableCommandPayload`: Optional boolean. When set to `true`, enables capturing of command payload details in
tracing spans.
- If `true`, the test runner SHOULD capture detailed command payload information in tracing spans.
- If `false` or omitted, the test runner SHOULD exclude command payload details.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize this impacts the test runner, but should it also refer to configuring the MongoClient to enable tracing?

nhachicha and others added 8 commits August 14, 2025 17:48
…TracingMessages-additionalProperties.yml

Co-authored-by: Jeremy Mikola <[email protected]>
…spanMalformedTagsMustBeObject.yml

Co-authored-by: Jeremy Mikola <[email protected]>
…TracingMessages-additionalPropertyType.yml

Co-authored-by: Jeremy Mikola <[email protected]>
…missingPropertySpans.yml

Co-authored-by: Jeremy Mikola <[email protected]>
…spanMalformedMissingName.yml

Co-authored-by: Jeremy Mikola <[email protected]>
…spanMalformedTagsMustBeObject.yml

Co-authored-by: Jeremy Mikola <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants